From 72ea3ceb62c21039afb48099e2fc47e141afd98b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 25 Mar 2018 14:05:34 +0200 Subject: dbmodel: improve pkgver() --- dbmodel/PKGBUILD | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'dbmodel/PKGBUILD') diff --git a/dbmodel/PKGBUILD b/dbmodel/PKGBUILD index 1974ca74..516759d0 100755 --- a/dbmodel/PKGBUILD +++ b/dbmodel/PKGBUILD @@ -27,7 +27,25 @@ sha512sums=('SKIP' pkgver(){ cd "${pkgname}" - printf "%s.r%s" "${_pkgver}" "$(git rev-list --count ${_commit}).$(git rev-parse --short ${_commit})" + git fetch --all >/dev/null 2>&1 + _commit=$( + git rev-parse origin/master + ) + printf '%s.r%s.%s\n' \ + "$( + git archive "${_commit}" -- 'src/src.pro' | \ + sed -n ' + s/^VERSION = // + T + p + ' + )" \ + "$( + git rev-list --count "${_commit}" + )" \ + "$( + git rev-parse --short "${_commit}" + )" } prepare() { -- cgit v1.2.3-70-g09d2