Travis wildcard is nonrecursive, glob pattern

I get failed to deploy even with

language: java
script:
- gradle check
- gradle jfxNative
deploy:
  provider: releases
  api_key:
    secure: some_api_key
  file_glob: true
  skip_cleanup: true

any ideas?

The option is passed to Dir.glob, so if you want to find files recursively, you need to pass the value correctly. Namely:

file: "build/jfx/native/**/*"

This should probably be added to the documentation.

It is a glob pattern, after all. If your deployment requires more complex patterns, then you should take that into account. Doing something extra to accommodate special use cases is not intuitive and surprising.

1 Like

hey @montana,

adding

file: "xxx" 

worked perfectly!

Hey @Spineswitch,

Great to know. I’ll be adding some of my response to the documentation, (e.g.) Dir.glob via finding files recursively.

1 Like

I just need to add,

In the future, local_dir clearly takes a directory name, not a glob pattern. In before_deploy, you have a couple of options, either: a) you’d want to create a directory to which you move build/*.dmg files (and adjust the local_dir value accordingly); or b) delete every file in build that does not match the pattern.

1 Like

Last thing I want to achieve, is to make gradle create jar files of the source folder, would this be similar?

To your question,

With grunt and gradle, you can always use a shell script containing something along the following lines:

orig=origfile.jar
tag=$(git tag --points-at=$(git rev-parse HEAD))
cp "$orig" "${orig%.jar}_${tag}.jar"
1 Like