Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
SemVer parsing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolay committed Nov 16, 2017
1 parent 01b5be6 commit 2f55081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ get_git_tags () {
local tag
for tag in $(git ls-remote --tags "${repo_url}"); do
if [[ ${tag} =~ refs/tags/v${SEMVER_REGEX}$ ]]; then
echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}.${BASH_REMATCH[4]}.${BASH_REMATCH[5]}"
echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}.${BASH_REMATCH[4]#-}.${BASH_REMATCH[5]#+}"
fi
done \
| LC_ALL=C sort -t '.' -k 1,1n -k 2,2n -k 3,3n -k 4,4d -k 5,5d \
| awk '{ FS="."; print $1 "." $2 "." $3 ($4 ? "+" $4 : "") ($5 ? "-" $5 : "") }' \
| awk '{ FS="."; print $1 "." $2 "." $3 ($4 ? "-" $4 : "") ($5 ? "+" $5 : "") }' \
| tr '\n' ' '
}

Expand Down

0 comments on commit 2f55081

Please sign in to comment.