Skip to content

Commit 1654659

Browse files
committed
git-extra: make pkgver slightly smarter
An update to the `pkgver` itself is not considered to be a vital change to `git-extra`, therefore tip commits touching only that line are excluded from the calculation of the package version. However, running an `/updpkgsums` may very well update also a checksum (which was exactly the case in #591 (comment)) and such a change should _likewise_ avoid advancing the `pkgver`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b1b6eb5 commit 1654659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-extra/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pkgver() {
2121
test ! -f "$(git rev-parse --git-path shallow)" || git -c http.sslbackend fetch --unshallow
2222
rev="$(git rev-list -1 HEAD -- .)"
2323
test -n "$(git show . |
24-
sed -n -e '1,/^@@/d' -e '/^[-+]pkgver=/d' -e '/^[-+]/p')" ||
24+
sed -n -e '1,/^@@/d' -e '/^[-+]pkgver=/d' -e '/^[-+]pkgver=/d' -e "/^[-+] *'[0-9a-f]\{64\}'$/d" -e '/^[-+]/p')" ||
2525
rev="$(git rev-list -1 $rev^ -- .)"
2626
printf "%s.%s.%s" "${_ver_base}" "$(git rev-list --count $rev -- .)" \
2727
"$(git rev-parse --short=9 $rev)"

0 commit comments

Comments
 (0)