Skip to content

Commit

Permalink
https://github.com/hazelcast/hazelcast-docker/pull/880#issuecomment-2…
Browse files Browse the repository at this point in the history
…642656411
  • Loading branch information
JackPGreen committed Feb 7, 2025
1 parent 51c0d1d commit 374765e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/scripts/version.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ function get_last_version_with_file() {
done
}

# Find the latest, non BETA or otherwise suffix-ed tag in the repo
# Find the highest-versioned, non BETA or otherwise suffix-ed tag in the repo
function get_last_version_tag_from_github() {
local repo=$1
gh api repos/"${repo}"/tags \
--jq 'first(.[] | select(.name | test("^v\\d+(\\.\\d+)*$")) | .name)'
tags=$(gh api repos/"${repo}"/tags \
--paginate \
--jq '.[] | select(.name | test("^v\\d+(\\.\\d+)*$")) | .name')
tags_sorted=$(sort --version-sort --reverse <<< "${tags}")
head --lines=1 <<< "${tags_sorted}"
}

0 comments on commit 374765e

Please sign in to comment.