diff options
author | Erich Eckner <git@eckner.net> | 2018-03-25 14:05:34 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-25 14:05:34 +0200 |
commit | 72ea3ceb62c21039afb48099e2fc47e141afd98b (patch) | |
tree | 0e06737c809cf4a4003be7423d490409a1cb924d /dbmodel | |
parent | 8e63786061a6695c72a25bf61483b9dd776efafd (diff) | |
download | archlinuxewe-72ea3ceb62c21039afb48099e2fc47e141afd98b.tar.xz |
dbmodel: improve pkgver()
Diffstat (limited to 'dbmodel')
-rwxr-xr-x | dbmodel/PKGBUILD | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/dbmodel/PKGBUILD b/dbmodel/PKGBUILD index 1974ca748..516759d09 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() { |