diff options
author | David Bremner <bremner@debian.org> | 2011-07-03 17:28:47 -0300 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-07-17 10:59:41 -0300 |
commit | 9b0dfd11c5d4af6dc4cd2b79f33e0d6c460d414e (patch) | |
tree | a70fd39bbf6c22435f88d35a89b837d16fc9f60d /Makefile.local | |
parent | 60173feb065a4306dc91093d886bf46475c23e11 (diff) |
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.
Diffstat (limited to 'Makefile.local')
-rw-r--r-- | Makefile.local | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.local b/Makefile.local index 990f8204..7fc68163 100644 --- a/Makefile.local +++ b/Makefile.local @@ -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 |