Rework MacOS support

This commit is contained in:
Phil Jay
2024-04-24 10:58:22 +10:00
parent 74a6f3d520
commit 13338be6d3
3 changed files with 31 additions and 13 deletions

View File

@@ -32,12 +32,12 @@ if [[ "${use_api:-}" == 'true' ]] ; then
-H "X-GitHub-Api-Version: 2022-11-28" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/git/matching-refs/tags/" \
| jq -r '.[].ref' | sed 's|refs/tags/||g' \
| { ${grep} -P "${pcre_allow_vprefix}" || true; } | sed 's/^v//g' | sort -V | tail -n 1
| { grep_p "${pcre_allow_vprefix}" || true; } | sed 's/^v//g' | sort -V | tail -n 1
)"
else
current_version="$(
git tag -l \
| { ${grep} -P "${pcre_allow_vprefix}" || true; } | sed 's/^v//g' | sort -V | tail -n 1
| { grep_p "${pcre_allow_vprefix}" || true; } | sed 's/^v//g' | sort -V | tail -n 1
)"
fi