Skip to content

Commit

Permalink
sfx: lexically comparable git-build versions
Browse files Browse the repository at this point in the history
if building from an untagged git commit, the third value in the
VERSION tuple (in __version__.py) was a string instead of an int,
causing the version to compare and sort incorrectly
  • Loading branch information
9001 committed Mar 18, 2024
1 parent ee80cdb commit 2b6a34d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/make-sfx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ git describe --tags >/dev/null 2>/dev/null && {

printf '%s\n' "$git_ver" | grep -qE '^v[0-9\.]+-[0-9]+-g[0-9a-f]+$' && {
# long format (unreleased commit)
t_ver="$(printf '%s\n' "$ver" | sed -r 's/\./, /g; s/(.*) (.*)/\1 "\2"/')"
t_ver="$(printf '%s\n' "$ver" | sed -r 's/[-.]/, /g; s/(.*) (.*)/\1 "\2"/')"
}

[ -z "$t_ver" ] && {
Expand Down

0 comments on commit 2b6a34d

Please sign in to comment.