summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-11-17 00:13:38 +0100
committerXZS2016-11-17 00:13:38 +0100
commit5f67e4fb583dd46d156277ef749f8d653ea8a1cf (patch)
treef67a2d443ae02d2bc104a7a5561d2a7681ced248 /PKGBUILD
parenteb4d72b8b069596f4a60afb8708a4790936092a2 (diff)
downloadaur-5f67e4fb583dd46d156277ef749f8d653ea8a1cf.tar.gz
follow pre-release scheme
The author of GNotifier pushes numbered pre-releases to the repository before marking the new version as stable. Pacman's version comparison supports such numbers when they are not separated from the last version component by a dot. Using these sticks more closely to the original numbers than the revision count prefixes previously employed. This decreases the pkgver and thus would normally require introducing an epoch. But this update does not affect the contents of the package, so there is no need to push it to users who already have the package installed. They will receive the change with the next release, which can be expected to start with '1.9.8.' (note the dot) or '1.9.9pre', which both compare greater to both the decreased and revision counted current version number. As an epoch should only be employed as a last measure [1], this temporary inconsistency does not rectify its introduction. [1]: https://wiki.archlinux.org/index.php/PKGBUILD#epoch
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD9
1 files changed, 6 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 077eee095422..f8a465c9b8d0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -42,9 +42,12 @@ query-version() {
}
pkgver() {
- find -iname '*.json' -exec sed -n \
- 's/.*"version"\s*:\s*"\([[:digit:].]*\)"\s*,.*/\1/p' \
- '{}' \; -quit 2>/dev/null | tr '\n' '.'
+ find xpi -name "gnotifier-$(
+ find -iname '*.json' -exec sed -n \
+ 's/.*"version"\s*:\s*"\([[:digit:].]*\)"\s*,.*/\1/p' \
+ '{}' \; -quit 2>/dev/null
+ )*" -printf '%f\n' | sed 's/^gnotifier-\(.*\).xpi$/\1/;
+ s/-final$//;s/-//' | sort -n | head -n1 | tr '\n' '.'
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}