raz / commit c3a65c4c

commit
c3a65c4c6e821f601aef59b57c8799bfdcbd0b24
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
4f54a7f2
Makefile: the version is the commit's hash where git describe finds no tag

patch · log

1 file changed, +3 -2

Makefile (history) modified +3 -2

@@ -15,12 +15,13 @@
1515 mkdir -p build/src
1616 printf 'module Version;\nconst Text* = "%s";\nend Version.\n' "$$(tr -d "'" < build/version.inc)" >$@
1717
18-# The version is git's name for the commit, or VERSION where it is given
18+# The version is git's name for the commit (a tag's, or with no tag, as in a
19+# shallow fetch, the commit's hash), or VERSION where it is given
1920 # (make dist REV=... VERSION=0.20.0 packs a release before its tag is
2021 # pushed, as the tag will); the file changes only when that does, so
2122 # raz isn't rebuilt for nothing.
2223 build/version.inc: FORCE | build
23- @v=$(if $(VERSION),$(VERSION),$$(git describe --tags --dirty 2>/dev/null || echo unknown)); \
24+ @v=$(if $(VERSION),$(VERSION),$$(git describe --tags --always --dirty 2>/dev/null || echo unknown)); \
2425 v="'$${v#v}'"; echo "$$v" | cmp -s - $@ || echo "$$v" >$@
2526
2627 FORCE: