summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Morris <kevin.morris@codestruct.net>2017-07-26 04:12:47 -0700
committerKevin Morris <kevin.morris@codestruct.net>2017-07-26 04:12:47 -0700
commit36e723bcdd89bc3d1111fab5510d41a0a4b859f3 (patch)
tree8f4961248d33842bb80a8e697b3e1bd29ba2afaf
parenta2b92dd4a2876b0cdf59f9d776a5e8ad18beab37 (diff)
downloadaur-36e723bcdd89bc3d1111fab5510d41a0a4b859f3.tar.gz
Update pkgver method
Signed-off-by: Kevin Morris <kevin.morris@codestruct.net>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
2 files changed, 6 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0b901e1..016393b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = sprunge
pkgdesc = Upload data to sprunge.us via stdin
- pkgver = 0.1.2
+ pkgver = r2.a2b92dd
pkgrel = 1
url = https://github.com/kevr/sprunge
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 0e5ab83..3d42154 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname='sprunge'
-pkgver='0.1.2'
+pkgver=r2.a2b92dd
pkgrel=1
pkgdesc='Upload data to sprunge.us via stdin'
license=('GPL2')
@@ -12,6 +12,10 @@ sha256sums=(
'7c65273804d26a24c1dcda83a559315b9f501013d3d77d7d140f882f05eb2b33'
)
+pkgver() {
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
package()
{
install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"