summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2021-10-05 08:45:27 +0200
committerGreyson Christoforo2021-10-24 12:28:56 +0100
commite99052d2c76950b6a41c3b5dac2ba8833cccdada (patch)
treef193a35fc79a03c728a0d1ee40dba96fa035075c
parentd14b44c302ff742eaa2bf140c2154796a11c159e (diff)
downloadaur-e99052d2c76950b6a41c3b5dac2ba8833cccdada.tar.gz
Fix pkgver(): tag lagging behind the project version
Signed-off-by: Greyson Christoforo <grey@christoforo.net>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
2 files changed, 6 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 62204e164592..272044f6f3da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout
- pkgver = 0.19.r909.gc401e3efe3
+ pkgver = 0.20.0.r1693.g8bb582f23f
pkgrel = 1
epoch = 0
url = https://www.freecadweb.org/
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() {