Skip Download(ing): prefix when calculating project version

This commit is contained in:
Alexey Andreev 2017-02-16 22:14:00 +03:00
parent 6817a7465d
commit a3d13bc8c5

View File

@ -11,7 +11,7 @@ branches:
env: env:
- MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" - MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
before_install: before_install:
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "^\["` - OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-build-`printf %05d $TRAVIS_BUILD_NUMBER` - NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-build-`printf %05d $TRAVIS_BUILD_NUMBER`
- echo "Building version $NEW_VERSION" - echo "Building version $NEW_VERSION"
- mvn versions:set -DnewVersion=$NEW_VERSION - mvn versions:set -DnewVersion=$NEW_VERSION