I successfully managed to deploy a JAR from a maven project to Github using tags. However, current configuration assumes that the file name of the JAR always stays the same, which it doesn't. When I do a new release this will change accordingly so deployment will fail.
Is there a way I can use kind of wildcards in the YAML file? From what I found here on Stackoverflow and on the web, wildcards are not supported in YAML. I couldn't find another hack for doing this without manipulating the .travis.yml file itself, which I would like to avoid.
The version string is available in pom.xml
.
Current .travis.yml:
language: java
jdk:
- openjdk7
deploy:
provider: releases
api_key:
secure: asfdsdflkjsdflkj...
file: target/helloci-1.0-SNAPSHOT.jar
on:
repo: ktk/helloci
all_branches: true
tags: true
I could surely script that somehow but then Travis CI would change its own configuration file and I'm not sure if this a) will work and b) is a good idea.
Repo I'm playing with: https://github.com/ktk/helloci
Wildcards are supported now, I run this setup:
before_deploy:
- "mvn -DskipTests package"
- export FOO=$(ls target/foo-version-*.jar)
deploy:
provider: releases
api_key:
secure: yep
file: "${FOO}"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments