Fix mercurial package versioning
Use `hg id -r .` to remove the working dir from the distance, and compare this distance with 1 instead of 0 because we always get a tagging commit in addition to the tagged commit. This now matches the logic inside hg.sr.ht/.builds/alpine.yml
This commit is contained in:
parent
b2f30e72f7
commit
5b554a38f0
6
pkgkit
6
pkgkit
|
@ -182,10 +182,10 @@ print_pkgver() {
|
|||
fi
|
||||
elif [ -d .hg ]
|
||||
then
|
||||
pkgver=$(hg id -T '{latesttag}')
|
||||
if [ "$(hg id -T '{latesttagdistance}')" -ne 0 ]
|
||||
pkgver=$(hg id -r . -T '{latesttag}')
|
||||
if [ "$(hg id -r . -T '{latesttagdistance}')" -ne 1 ]
|
||||
then
|
||||
pkgver="$(hg id -T '{latesttag}_hg{sub("-", "", date|shortdate)}')"
|
||||
pkgver="$(hg id -r . -T '{latesttag}_hg{sub("-", "", date|shortdate)}')"
|
||||
fi
|
||||
else
|
||||
pkgver=unknown_0000
|
||||
|
|
Loading…
Reference in New Issue