summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPier Luigi Fiorini2019-01-08 23:44:51 +0100
committerPier Luigi Fiorini2019-01-08 23:44:51 +0100
commit82d198b3cc288becdfaed97488101af996d49a07 (patch)
tree6e2f521ad3d7dab5a33d09c6e8d124031b584c30
parent4ee52dda859be67922c22aee67568fcd210ca45b (diff)
downloadaur-82d198b3cc288becdfaed97488101af996d49a07.tar.gz
Update pkgver
-rw-r--r--PKGBUILD5
1 files changed, 4 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 97681e65c44..81092d233db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,7 +22,10 @@ md5sums=('SKIP')
pkgver() {
cd ${srcdir}/${_gitname}
- echo "$(git log -1 --format="%cd" --date=short | tr -d '-').$(git rev-list --count HEAD).$(git log -1 --format="%h")"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
prepare() {