summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-02-13 14:00:50 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-02-13 18:14:36 +0100
commit6d55e3a3641b35dd2bb4306711b4db4004bf6817 (patch)
tree48502b20e263f6c67e68c5e9801ea2ad74f64cf7 /tools
parentpo: Translated using Weblate (Korean) (diff)
downloadsystemd-6d55e3a3641b35dd2bb4306711b4db4004bf6817.tar.xz
systemd-6d55e3a3641b35dd2bb4306711b4db4004bf6817.zip
Use tilde for rc tag versioning
tilde sorts lower in the version comparison spec: https://uapi-group.org/specifications/specs/version_format_specification/ ➜ systemd git:(strip) systemd-analyze compare-versions 249\~rc1 249 249\~rc1 < 249 ➜ systemd git:(strip) systemd-analyze compare-versions 249-rc1 249 249-rc1 > 249 Also update tools/meson-vcs-tag.sh to use carets instead of hyphens for the git part of the version as carets are allowed to be part of a version by pacman while hyphens are not and both sort higher than a version without the git part.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/meson-vcs-tag.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/meson-vcs-tag.sh b/tools/meson-vcs-tag.sh
index 4a8dc89ab2..6bac603929 100755
--- a/tools/meson-vcs-tag.sh
+++ b/tools/meson-vcs-tag.sh
@@ -29,5 +29,8 @@ else
fi
fi
[ -z "$c" ] && c="${fallback}"
- echo "$c" | sed 's/^v//; s/-rc/~rc/'
+ # Replace any hyphens with carets which are allowed in versions by pacman whereas hyphens are not. Git
+ # versions with carets will also sort higher than their non-git version counterpart both in pacman
+ # versioning and in version comparision spec versioning.
+ echo "$c" | sed 's/^v//; s/-/^/g'
fi