Skip to content

Commit

Permalink
chore(versioning): show error message if current commit is tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
xaf committed Jan 13, 2025
1 parent bf7a0a4 commit 0291077
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .omni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ commands:
run: |
set -e
# Do not create a new tag if the current version is tagged already
current_tag=$(git describe --tags --match 'v*' 2>/dev/null || true)
if [[ -n "$current_tag" ]]; then
echo "Current commit is already tagged: $current_tag"
exit 1
fi
# We are using CalVer for versioning, so let's generate the tag
# prefix; we also do not want the month to be 0-padded
tag_prefix="v$(date +'%Y.%-m')"
Expand Down

0 comments on commit 0291077

Please sign in to comment.