prevent mistake of releasing from wrong branch (#22043)
(cherry picked from commit 566e5a09fa3883f1f70abd80da10fece0ffce0a6)
This commit is contained in:
parent
108517958e
commit
6454c090cc
1 changed files with 5 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue