From 7ea72d570d35f03ae48ccd6fd291dfdde89a65e4 Mon Sep 17 00:00:00 2001 From: David Karnok Date: Fri, 24 Mar 2017 11:07:16 +0100 Subject: [PATCH] 2.x: safeguard against building with v1 tags (#5219) --- gradle/buildViaTravis.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gradle/buildViaTravis.sh b/gradle/buildViaTravis.sh index 51a1a750c2..e9edb562aa 100755 --- a/gradle/buildViaTravis.sh +++ b/gradle/buildViaTravis.sh @@ -1,6 +1,13 @@ #!/bin/bash # This script will build the project. +buildTag="$TRAVIS_TAG" + +if [ "$buildTag" != "" ] && [ "${buildTag:0:3}" != "v2." ]; then + echo -e "Wrong tag on the 2.x brach: $buildTag : build stopped" + exit 1 +fi + GRADLE_OPTS=-Xmx832m if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then