diff options
author | Tom <thomas.verin@sonarsource.com> | 2016-05-20 10:05:05 +0200 |
---|---|---|
committer | Tom <thomas.verin@sonarsource.com> | 2016-05-20 10:05:05 +0200 |
commit | e78e24086ed4f7b6bc09be43f54fea8a85fc1d8d (patch) | |
tree | 90a6269faf1d547ee2fcd6db1a1967d6104dc6f3 | |
parent | 363588ba0d89ce2449a6d93f739cadf86e30618b (diff) | |
download | sonarqube-e78e24086ed4f7b6bc09be43f54fea8a85fc1d8d.tar.gz sonarqube-e78e24086ed4f7b6bc09be43f54fea8a85fc1d8d.zip |
handle release version in travis.sh
-rwxr-xr-x | travis.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/travis.sh b/travis.sh index 18715fa34d2..9859d8a5f3c 100755 --- a/travis.sh +++ b/travis.sh @@ -31,12 +31,20 @@ CI) elif [[ "${TRAVIS_BRANCH}" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then strongEcho 'Build and deploy' - # Do not deploy a SNAPSHOT version but the release version related to this build - set_maven_build_version $TRAVIS_BUILD_NUMBER + # get current version from pom + CURRENT_VERSION=`maven_expression "project.version"` + + if [[ $CURRENT_VERSION =~ "-SNAPSHOT" ]]; then + echo "======= Found SNAPSHOT version =======" + # Do not deploy a SNAPSHOT version but the release version related to this build + set_maven_build_version $TRAVIS_BUILD_NUMBER + else + echo "======= Found RELEASE version =======" + fi # analysis is currently executed by SonarSource internal infrastructure mvn deploy \ - -Pdeploy-sonarsource \ + -Pdeploy-sonarsource,release \ -B -e -V elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then |