Skip to content

Commit

Permalink
Abort workflow if tag does not have format v<major>.<minor>.<patch>
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuarez committed Feb 3, 2024
1 parent 8657852 commit 65b2889
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/update-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ fi

# Checkout correct branch for release
case "$TAG" in
(*.0)
(v*.0)
# Branch latest tracks <major>.<minor>.0 releases
git checkout latest
;;
(*)
(v*)
# Branch v<major>.<minor>-dev tracks patch releases
PREFIX="${TAG%.*}"
BRANCH="${PREFIX}-dev"
Expand All @@ -51,6 +51,9 @@ case "$TAG" in
fi
fi
;;
(*)
echo "Tag $TAG does not have format v<major>.<minor>.<patch>. Aborting workflow..."
exit 1
esac

# Download latest OpenAPI spec and CLI doc, and update if necessary
Expand Down

0 comments on commit 65b2889

Please sign in to comment.