Fail the the finish_release.sh script if the tag already exists locally

Motivation:

We should fail the script if the tag already exists locally to ensure we really deploy the right code

Modifications:

Check if the tag already exists and if so print an error and exit

Result:

No risks to deploy wrong code as part of the release
This commit is contained in:
Norman Maurer 2021-02-17 21:27:27 +01:00
parent 5d012954fd
commit b0ec37d686

View File

@ -15,6 +15,11 @@ fi
BRANCH=$(git branch --show-current)
if git tag | grep -q "$2" ; then
echo "Tag $2 already exists"
exit 1
fi
git fetch
git checkout "$2"