From 41de202da75b1624536f2bf23db13ed6482a17d2 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Wed, 21 Feb 2018 18:30:27 +0000 Subject: [PATCH] Fix pkgver() function and use the one from Arch Wiki This changes the pkgver() function to use exactly the version suggested in the Arch Wiki: https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git --- .SRCINFO | 4 ++-- PKGBUILD | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index ec860c4..78176a2 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = wlroots-git pkgdesc = Modular Wayland compositor library - pkgver = r1924.2e7d8862 - pkgrel = 1 + pkgver = r1924.2e7d886 + pkgrel = 2 url = https://github.com/swaywm/wlroots arch = x86_64 license = custom:MIT diff --git a/PKGBUILD b/PKGBUILD index 15972f1..bd80a8b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Adrian Perez de Castro pkgname='wlroots-git' -pkgver=r1924.2e7d8862 -pkgrel=1 +pkgver=r1924.2e7d886 +pkgrel=2 license=('custom:MIT') pkgdesc='Modular Wayland compositor library' url='https://github.com/swaywm/wlroots' @@ -20,7 +20,7 @@ pkgver () { cd "${pkgname}" ( set -o pipefail - git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^version\.//' || + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ) }