summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtifChy2021-08-31 00:53:00 +0600
committerAtifChy2021-08-31 00:53:00 +0600
commit3c78f9159b367a785dcf710962782f48e1b7a3d4 (patch)
tree9a493820ab5a5a141e45410a938a11bf62ddb4e4
parent2cc763c98724a4fc0eab1df057a18d565d0f6138 (diff)
downloadaur-3c78f9159b367a785dcf710962782f48e1b7a3d4.tar.gz
better pkgver()
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
2 files changed, 5 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dd08a5a7b66..cf4e7f9b9b5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = eww-git
pkgdesc = ElKowar's wacky widgets
- pkgver = 70285e0_2021.08.27
- pkgrel = 2
+ pkgver = 0.1.0.r164.g70285e0
+ pkgrel = 1
url = https://github.com/elkowar/eww
arch = any
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index f588c901ac4..1fc05724094 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Atif Chowdhury <iftakhar.awal@gmail.com>
pkgname=eww-git
_pkgname=eww
-pkgver=70285e0_2021.08.27
-pkgrel=2
+pkgver=0.1.0.r164.g70285e0
+pkgrel=1
epoch=
pkgdesc="ElKowar's wacky widgets"
arch=('any')
@@ -27,9 +27,7 @@ validpgpkeys=()
pkgver() {
cd ${_pkgname}
- _commit=$(git rev-parse HEAD | cut -c1-7)
- _date=$(git log -1 --date=short --pretty=format:%cd)
- printf "%s_%s\n" "${_commit}" "${_date}" | sed 's/-/./g'
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {