summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Day2021-12-28 05:12:43 -0600
committerJordan Day2021-12-28 05:12:43 -0600
commitb828a369345d8eb7804e2d82631bce9967ee4ad1 (patch)
tree00030a6c2c87458f2f685a1fc83c84923d0785b8
parent41b61efb14bddc045ad253a804760f1de11f5631 (diff)
downloadaur-b828a369345d8eb7804e2d82631bce9967ee4ad1.tar.gz
Calculate pkgver from last commit
-rw-r--r--.SRCINFO2
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD7
3 files changed, 8 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4f60fec02340..fb5d2b1cf3cc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = hypr-git
pkgdesc = Hypr is a Linux tiling window manager for Xorg. It's written in XCB with modern C++ and aims to provide easily readable and expandable code.
- pkgver = 0.0
+ pkgver = 0.0.r255.fa20d13
pkgrel = 1
url = https://github.com/vaxerski/Hypr
arch = x86_64
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7dca3423bd09
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+hypr-git*
diff --git a/PKGBUILD b/PKGBUILD
index de97f4a0bc97..b5c6909d44d1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Jordan Day < jordanday444 at gmail dot com >
pkgname=hypr-git
-pkgver=0.0
+pkgver=0.0.r255.fa20d13
pkgrel=1
pkgdesc="Hypr is a Linux tiling window manager for Xorg. It's written in XCB with modern C++ and aims to provide easily readable and expandable code."
arch=('x86_64')
@@ -11,6 +11,11 @@ depends=('cairo' 'gdb' 'ninja' 'gcc' 'cmake' 'libxcb' 'xcb-proto' 'xcb-util' 'xc
source=("$pkgname::git+https://github.com/vaxerski/Hypr")
sha256sums=('SKIP')
+pkgver() {
+ cd $pkgname
+ printf "0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
build() {
cd $srcdir/$pkgname