Skip to content

Commit

Permalink
fix: added fetching from remote
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsonbrsilva committed May 1, 2024
1 parent 7237e52 commit 4bc87e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/create-pre-release-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ jobs:
regex="([0-9]+)\.([0-9]+)\.([0-9]+)-rc-([0-9]+)"
rc_version=1
fail_to_fetch() {
printf "Failed to fetch tags from remote.\n"
exit 1
}
fetch_tags_from_remote() {
git fetch --unshallow origin --tags > /dev/null 2>&1 || fail_to_fetch
}
fetch_tags_from_remote
version=$(git tag -l "$version*" | sort -V | tail -n 1)
printf "Last version: %s\n" "$version"
if [[ $version =~ $regex ]]; then
Expand Down

0 comments on commit 4bc87e1

Please sign in to comment.