summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkRHYME72024-03-18 18:40:11 +0800
committerkRHYME72024-03-18 18:40:11 +0800
commitd6af6b5446d06386bf1a6ce8c9194294057652ac (patch)
tree82a29bbc7f27de89f1f1516d55871d70a3b92e58
parentf5bc07caae9a1ca33995efcb0a6c237bab5eb950 (diff)
downloadaur-d6af6b5446d06386bf1a6ce8c9194294057652ac.tar.gz
Update PKGBUILD
-rw-r--r--PKGBUILD17
1 files changed, 14 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0d7762a383e9..c6eed6b9cb54 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,12 +11,23 @@ source=("git+https://github.com/kRHYME7/Hyprdots-ctl.git")
md5sums=('SKIP')
conflicts=("hyprdots-ctl")
+
+# pkgver() {
+# cd "$srcdir/Hyprdots-ctl" || return
+# git fetch --tags
+# git describe --long --tags --always | sed 's/-/./g' # Replace hyphens with dots to conform to versioning standards
+# }
+
pkgver() {
- cd "$srcdir/Hyprdots-ctl" || return
- git fetch --tags
- git describe --long --tags --always | sed 's/-/./g' # Replace hyphens with dots to conform to versioning standards
+ cd "$srcdir/Hyprdots-ctl" || return
+ git fetch --tags
+ # Use git describe with a fallback to the commit hash if no tags are found
+ local version=$(git describe --tags --always --dirty 2>/dev/null || git rev-parse --short HEAD)
+ # Replace hyphens with dots to conform to versioning standards
+ echo "$version" | sed 's/-/./g'
}
+
package() {
cd "${srcdir}/Hyprdots-ctl" || return
make DESTDIR="$pkgdir" clean all