summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordr460nf1r32021-04-28 22:26:51 +0200
committerdr460nf1r32021-04-28 22:26:51 +0200
commit4aac7c15a8647ee24a3d22174e468b32503a3e7a (patch)
treebcb0cdc807bed801fc6fc83e4e85f2cb6d9be36c
parent64bbbbf4871563a9b83584803b25dc7532554c3d (diff)
downloadaur-4aac7c15a8647ee24a3d22174e468b32503a3e7a.tar.gz
Improve pkgver
-rw-r--r--PKGBUILD10
1 files changed, 5 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 485028539cd..669ddb18c25 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=ananicy-cpp-git
_pkgname=ananicy-cpp
-pkgver=r35.72dbc62
+pkgver=v0.2.1.r17.g5d8f1b6
pkgrel=1
pkgdesc="Ananicy Cpp is a full rewrite of Ananicy in C++, featuring lower CPU and RAM usage."
source=("git+https://gitlab.com/aviallon/ananicy-cpp.git")
@@ -13,10 +13,10 @@ makedepends=(cmake git gcc)
conflicts=(ananicy-cpp)
provides=(ananicy-cpp)
-pkgver() {
- cd "$_pkgname"
- echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
-}
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
prepare() {
cd "$_pkgname"