From 73bd4a955222aa31a8feb067bedeca3d97d90b4f Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 3 Mar 2017 17:23:35 +0100 Subject: Fix build version of RC to not have "x.y-RCz.0." The correct format is "x.y.0." --- travis.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'travis.sh') diff --git a/travis.sh b/travis.sh index b4299fc8ceb..b68726d718e 100755 --- a/travis.sh +++ b/travis.sh @@ -64,8 +64,8 @@ function installJdk8 { function fixBuildVersion { export INITIAL_VERSION=`maven_expression "project.version"` - # resolve suffix -SNAPSHOT - without_suffix=`echo $INITIAL_VERSION | sed "s/-SNAPSHOT//g"` + # remove suffix -SNAPSHOT or -RC + without_suffix=`echo $INITIAL_VERSION | sed "s/-.*//g"` IFS=$'.' fields_count=`echo $without_suffix | wc -w` @@ -76,13 +76,13 @@ function fixBuildVersion { export BUILD_VERSION="$without_suffix.$TRAVIS_BUILD_NUMBER" fi - if [ "${without_suffix}" == "${INITIAL_VERSION}" ]; then - # not a SNAPSHOT: milestone, RC or GA - export PROJECT_VERSION=$INITIAL_VERSION - else + if [ "${INITIAL_VERSION}" == *"-SNAPSHOT" ]; then # SNAPSHOT export PROJECT_VERSION=$BUILD_VERSION mvn org.codehaus.mojo:versions-maven-plugin:2.2:set -DnewVersion=$PROJECT_VERSION -DgenerateBackupPoms=false -B -e + else + # not a SNAPSHOT: milestone, RC or GA + export PROJECT_VERSION=$INITIAL_VERSION fi echo "Build Version : $BUILD_VERSION" -- cgit v1.2.3