Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
fix: Prevent deploys if tag is not unique (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu authored Jul 13, 2021
1 parent d4628f7 commit dcec360
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ update_branch () {
}

tag_and_push () {
# Test is tag exists
if git rev-parse "refs/tags/${RELEASE_TAG}" >/dev/null 2>&1; then
echo "Version ${RELEASE_TAG} already exists. Update the release before deploying"
exit 1
fi
# Tag the version change
git tag "$RELEASE_TAG"
# Push tag
Expand Down

0 comments on commit dcec360

Please sign in to comment.