mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-03-14 03:25:15 +01:00
build-system: use signed tag to make tar file, if available.
This as the advantage that "make VERSION=n.m dist" will work correctly even if the wrong branch happens to be checked out.
This commit is contained in:
parent
60173feb06
commit
9b0dfd11c5
1 changed files with 7 additions and 1 deletions
|
@ -61,7 +61,13 @@ endif
|
|||
endif
|
||||
|
||||
$(TAR_FILE):
|
||||
git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD > $(TAR_FILE).tmp
|
||||
if git tag -v $(VERSION) >/dev/null 2>&1; then \
|
||||
ref=$(VERSION); \
|
||||
else \
|
||||
ref="HEAD" ; \
|
||||
echo "Warning: No signed tag for $(VERSION)"; \
|
||||
fi ; \
|
||||
git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ $$ref > $(TAR_FILE).tmp
|
||||
echo $(VERSION) > version.tmp
|
||||
tar --append -f $(TAR_FILE).tmp --transform s_^_$(PACKAGE)-$(VERSION)/_ --transform 's_.tmp$$__' version.tmp
|
||||
rm version.tmp
|
||||
|
|
Loading…
Add table
Reference in a new issue