Fixed Manjaro pkgver() generation to produce Arch-valid version strings when git describe includes pre-release hyphens (for example -pre1) by normalizing the describe suffix and replacing remaining hyphens with dots. This prevents invalid pkgver values like ...pre1-40-g....

This commit is contained in:
2026-02-23 09:54:11 -07:00
parent 498497171b
commit 66d0549938

View File

@@ -42,7 +42,8 @@ pkgver() {
if git describe --long --tags --abbrev=7 >/dev/null 2>&1; then
git describe --long --tags --abbrev=7 \
| sed 's/^v//' \
| sed 's/-/.r/;s/-/./'
| sed -E 's/([^-]+)-([0-9]+)-g/\1.r\2.g/' \
| sed 's/-/./g'
else
printf '0.r%s.%s\n' \
"$(git rev-list --count HEAD)" \