Skip to content

Commit

Permalink
PRO-569 FIX Ensure tag is checked out
Browse files Browse the repository at this point in the history
  • Loading branch information
bender2352 committed Nov 8, 2024
1 parent 48ce361 commit f5d828e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/create_tag
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${G

# Check if the tag already exists on the remote
if git ls-remote --tags origin | grep -q "refs/tags/${VERSION_TAG}"; then
# Ensure the tag is checked out if it exists
git fetch origin "refs/tags/${VERSION_TAG}:refs/tags/${VERSION_TAG}"
git checkout "${VERSION_TAG}"

# If the latest tag doesn't match VERSION_TAG, exit with an error
if [[ "$(git describe --tags --abbrev=0)" != "${VERSION_TAG}" ]]; then
echo "Error: Latest tag does not match VERSION_TAG. Exiting."
Expand Down

0 comments on commit f5d828e

Please sign in to comment.