mirror of
https://github.com/reecetech/version-increment.git
synced 2025-12-21 14:35:44 +00:00
Fix tests; Pre-filter tags
This commit is contained in:
@@ -32,17 +32,17 @@ 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' \
|
||||
| while read -r tag; do remove_prefix "$tag"; done \
|
||||
| { grep_p "${pcre_allow_vprefix}" || true; } \
|
||||
| sed 's/^v//g' \
|
||||
| while read -r tag; do remove_prefix "$tag"; done \
|
||||
| sort -V | tail -n 1
|
||||
)"
|
||||
else
|
||||
current_version="$(
|
||||
git tag -l \
|
||||
| while read -r tag; do remove_prefix "$tag"; done \
|
||||
| { grep_p "${pcre_allow_vprefix}" || true; } \
|
||||
| sed 's/^v//g' \
|
||||
| while read -r tag; do remove_prefix "$tag"; done \
|
||||
| sort -V | tail -n 1
|
||||
)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user