Skip to content

Commit

Permalink
PRO-599 FIX Previous tag definition fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bender2352 committed Nov 11, 2024
1 parent 6171a27 commit 742dc76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/create_release
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set -euf -o pipefail
: "${GITHUB_REPOSITORY_OWNER:?GITHUB_REPOSITORY_OWNER is required}"
: "${VERSION_TAG:?VERSION_TAG is required}"

# Get the previous tag, filtering by a pattern that matches your tag format (e.g., date-time-hash)
PREVIOUS_TAG="$(git tag -l '20[0-9]{6}-[0-9]{4}-[a-f0-9]{8}' | sort | tail -n2 | head -n1)"
# Get the previous tag
PREVIOUS_TAG="$(git tag -l '20*-*-*' | sort | tail -n2 | head -n1)"

# Check if PREVIOUS_TAG is empty and exit with an error if so
if [[ -z "${PREVIOUS_TAG}" ]]; then
Expand Down

0 comments on commit 742dc76

Please sign in to comment.