summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDavid Parrish2017-04-16 11:33:51 -0400
committerDavid Parrish2017-04-16 11:33:51 -0400
commitefef925e1f83d77e5c1b8f630c66668b31b86edb (patch)
tree56cd9402db89c769d9dba1321e0c2bd0ed769d4b /PKGBUILD
parentd6f50ed8b939de38f4fe508c5ede58eba7829eae (diff)
downloadaur-efef925e1f83d77e5c1b8f630c66668b31b86edb.tar.gz
Add pkgver for determing the current version from git
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD7
1 files changed, 6 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9349a1ba224d..7afbd432f93a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: David Parrish <daveparrish@tutanota.com>
pkgname=habitat-git
-pkgver=0.20.0
+pkgver=0.20.0.r64.g232f7c63
pkgrel=1
pkgdesc="Application automation framework that allows you to build applications that have automation built-in"
arch=('x86_64')
@@ -12,6 +12,11 @@ makedepends=('cargo')
source=("${pkgname}::git+https://github.com/habitat-sh/habitat.git")
sha256sums=('SKIP')
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
build() {
# Use a temporary local Cargo repository.
export CARGO_HOME="${srcdir}/cargo-repository"