summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Torres2023-11-11 15:25:10 +0000
committerRalph Torres2023-11-11 15:25:10 +0000
commitd8da084badb89999e787b9c538d5f3f1d37ca708 (patch)
treead45c26311917cdac6a40e7dd209550a0f88c8d5
parent0d54e727728326db48174cab12090c61435164d4 (diff)
downloadaur-d8da084badb89999e787b9c538d5f3f1d37ca708.tar.gz
add pkgver()
Executing makepkg will cause pkgver() to update pkgver in PKGBUILD. The format (of form, say, 0.11.0.r18.e125c77) follows the convention described in the wiki.
-rw-r--r--PKGBUILD6
1 files changed, 6 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 141eb68516f0..3b655d7c33ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,6 +19,12 @@ sha512sums=(SKIP)
_pkgname=${pkgname%-irc-client-git}
+pkgver() {
+ cd $_pkgname
+ git describe --tags --long | \
+ sed -e 's/\([^-]*-\)g/r\1/' -e 's/-/./g' -e 's/^v//'
+}
+
build() {
cd $_pkgname
cargo install --path crates/$_pkgname --features=desktop-notifications