summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacopo2015-09-24 23:45:23 +0200
committerjacopo2015-09-24 23:45:23 +0200
commitfe8424f866ba5d8ed83e1f6c59eb4766a9ac41e4 (patch)
tree406eaa42ca3f3d7a49728b100699676688e2a24b
parente10c3a105c260ecd34caa5ec9311a2e9108b80a4 (diff)
downloadaur-fe8424f866ba5d8ed83e1f6c59eb4766a9ac41e4.tar.gz
New versioning
-rw-r--r--PKGBUILD8
1 files changed, 6 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ff104f6cfa2..3693c39cece 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,8 +13,12 @@ md5sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
- #printf "%s_%s" "$(date +%Y%m%d)" "$(git log --pretty=format:'%h' -n 1)"
- git log --pretty=format:'%h' -n 1
+# printf "%s_%s" "$(date +%Y%m%d)" "$(git log --pretty=format:'%h' -n 1)"
+# git log --pretty=format:'%h' -n 1
+ ( 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)"
+ )
}
package() {