diff options
author | bartus | 2021-10-05 08:45:27 +0200 |
---|---|---|
committer | Greyson Christoforo | 2021-10-24 12:28:56 +0100 |
commit | e99052d2c76950b6a41c3b5dac2ba8833cccdada (patch) | |
tree | f193a35fc79a03c728a0d1ee40dba96fa035075c /PKGBUILD | |
parent | d14b44c302ff742eaa2bf140c2154796a11c159e (diff) | |
download | aur-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-- | PKGBUILD | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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() { |