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:
parent
5d012954fd
commit
b0ec37d686
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user