be explicit about hash length

different git versions have different defaults
This commit is contained in:
Damien Elmes 2020-01-05 12:20:35 +10:00
parent a4d38d65a6
commit f4649b515f

View File

@ -23,7 +23,7 @@ pyenv:
.PHONY: buildhash
buildhash:
oldhash=$$(test -f meta/buildhash && cat meta/buildhash || true); \
newhash=$$(git rev-parse --short HEAD); \
newhash=$$(git rev-parse --short=8 HEAD); \
if [ "$$oldhash" != "$$newhash" ]; then \
echo $$newhash > meta/buildhash; \
fi
@ -88,4 +88,4 @@ fix:
add-buildhash:
@ver=$$(cat meta/version); \
hash=$$(cat meta/buildhash); \
rename "s/-$${ver}-/-$${ver}+$${hash}-/" dist/*-$$ver-*
rename "s/-$${ver}-/-$${ver}+$${hash}-/" dist/*-$$ver-*