summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAdrien Prost-Boucle2019-12-02 10:30:43 +0100
committerAdrien Prost-Boucle2019-12-02 10:30:43 +0100
commitcd5dcec0908b9c0a348a9f7566db6e9b4563f84b (patch)
tree7fce731d70716ed0435d93352dc02846f19a4e0d /PKGBUILD
parent5cdf0447fba4ccef14e988a62224679da2d61b8d (diff)
downloadaur-cd5dcec0908b9c0a348a9f7566db6e9b4563f84b.tar.gz
Change revision numbering to include commit short hash
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 12 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 109efdaee5f..4c047c68047 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adrien Prost-Boucle <adrien.prost-boucle@laposte.net>
pkgname=ghdl-mcode-git
-pkgver=0.37dev.git20190925
+pkgver=0.37dev.r4250.gd11ad228
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc='VHDL simulator - mcode back-end'
@@ -15,7 +15,7 @@ makedepends=('gcc-ada' 'git')
source=(
"ghdl::git://github.com/ghdl/ghdl.git"
)
-md5sums=(
+sha256sums=(
'SKIP'
)
@@ -23,11 +23,17 @@ pkgver() {
cd "${srcdir}/ghdl"
# GHDL version (extracted from configure)
- _distver=`sed -n -e 's/^ghdl_version=.*"\(.*\)".*/\1/p' configure | tr -d '-'`
- # Date of the last git commit
- _gitver=`git log -n 1 --date=short | sed -n -e 's/.*Date:\s*\([0-9-]*\).*/\1/p' | tr -d -`
+ local _distver=`sed -n -e 's/^ghdl_version=.*"\(.*\)".*/\1/p' configure | tr -d '-'`
- echo $_distver.git$_gitver;
+ # Date of the last git commit
+ #local _gitver=`git log -n 1 --date=short | sed -n -e 's/.*Date:\s*\([0-9-]*\).*/\1/p' | tr -d -`
+ # Revision number
+ local _gitrev=`git rev-list --count HEAD`
+ # Short hash oatest commit
+ local _githash=`git rev-parse --short HEAD`
+
+ #echo $_distver.git$_gitver;
+ echo $_distver.r$_gitrev.g$_githash;
}
build() {