prevent mistake of releasing from wrong branch (#22043)

(cherry picked from commit 566e5a09fa3883f1f70abd80da10fece0ffce0a6)
This commit is contained in:
Patrik Nordwall 2016-12-20 13:44:16 +01:00
parent 108517958e
commit 6454c090cc

View file

@ -275,7 +275,11 @@ try ssh -t ${release_server} echo "Successfully contacted release server."
echolog "Getting current project version from sbt..."
declare -r current_version=$(get_current_version)
echolog "Current version is ${current_version}"
echolog "Current version is ${current_version} on branch $initial_branch"
if [ "${current_version:0:3}" != "${version:0:3}" ]; then
fail "Releasing $version from wrong branch $initial_branch with version $current_version"
fi
# check out a release branch
try git checkout -b ${release_branch}