mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
sfx: lexically comparable git-build versions
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
This commit is contained in:
parent
ee80cdb9cf
commit
2b6a34dc5c
|
@ -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]+$' && {
|
printf '%s\n' "$git_ver" | grep -qE '^v[0-9\.]+-[0-9]+-g[0-9a-f]+$' && {
|
||||||
# long format (unreleased commit)
|
# 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" ] && {
|
[ -z "$t_ver" ] && {
|
||||||
|
|
Loading…
Reference in a new issue