summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorbartus2021-10-05 08:45:27 +0200
committerGreyson Christoforo2021-10-24 12:28:56 +0100
commite99052d2c76950b6a41c3b5dac2ba8833cccdada (patch)
treef193a35fc79a03c728a0d1ee40dba96fa035075c /PKGBUILD
parentd14b44c302ff742eaa2bf140c2154796a11c159e (diff)
downloadaur-e99052d2c76950b6a41c3b5dac2ba8833cccdada.tar.gz
Fix pkgver(): tag lagging behind the project version
Signed-off-by: Greyson Christoforo <grey@christoforo.net>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD7
1 files changed, 5 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dab90be5417c..f184a7f89067 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Grey Christoforo <first name at last name dot net>
pkgname=freecad-git
-pkgver=0.19.r909.gc401e3efe3
+pkgver=0.20.0.r1693.g8bb582f23f
pkgrel=1
epoch=0
pkgdesc='A general purpose 3D CAD modeler - git checkout'
@@ -59,7 +59,10 @@ md5sums=('SKIP')
pkgver() {
cd FreeCAD
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ read -d$'/n' -r major minor patch < <(grep -Po "set\(PACKAGE_VERSION_(MAJOR|MINOR|PATCH) \"\K[0-9]*" CMakeLists.txt) || true
+ count=$(git rev-list --count $(git tag --sort=-creatordate|head -1)..HEAD)
+ hash=$(git rev-parse --short HEAD)
+ printf "%d.%d.%d.r%d.g%s" "$major" "$minor" "$patch" "$count" "$hash"
}
prepare() {