summaryrefslogtreecommitdiff
path: root/dbmodel/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'dbmodel/PKGBUILD')
-rwxr-xr-xdbmodel/PKGBUILD20
1 files changed, 19 insertions, 1 deletions
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() {