From 6817a7465dac9ad127671d6c1d7b0147797ab984 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 16 Feb 2017 22:09:10 +0300 Subject: [PATCH] Pad build number with zeros. Log version number --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5966c60a6..d8a625527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,8 @@ env: - MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" before_install: - OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "^\["` - - NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-build-$TRAVIS_BUILD_NUMBER + - NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-build-`printf %05d $TRAVIS_BUILD_NUMBER` + - echo "Building version $NEW_VERSION" - mvn versions:set -DnewVersion=$NEW_VERSION script: > mvn -e test \