Fix pkgver(): tag lagging behind the project version
Signed-off-by: Greyson Christoforo <grey@christoforo.net>
This commit is contained in:
parent
d14b44c302
commit
e99052d2c7
2 changed files with 6 additions and 3 deletions
2
.SRCINFO
2
.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/
|
||||
|
|
7
PKGBUILD
7
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() {
|
||||
|
|
Loading…
Reference in a new issue