Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 87703429E32 for ; Mon, 4 Jul 2011 05:04:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FLPg2QDASyoq for ; Mon, 4 Jul 2011 05:04:01 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 33ABD429E31 for ; Mon, 4 Jul 2011 05:04:00 -0700 (PDT) Received: from zancas.localnet (fctnnbsc30w-142167177149.pppoe-dynamic.High-Speed.nb.bellaliant.net [142.167.177.149]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p64C3uj6027978 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 4 Jul 2011 09:03:57 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1Qdhsa-0008Mp-PL; Mon, 04 Jul 2011 09:03:56 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH 4/6] build-system: use signed tag to make tar file, if available. Date: Mon, 4 Jul 2011 09:03:39 -0300 Message-Id: <1309781021-32062-5-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309781021-32062-1-git-send-email-david@tethera.net> References: <1309781021-32062-1-git-send-email-david@tethera.net> Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2011 12:04:02 -0000 From: David Bremner This as the advantage that "make VERSION=n.m dist" will work correctly even if the wrong branch happens to be checked out. --- Makefile.local | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index b6445e5..d1c0737 100644 --- a/Makefile.local +++ b/Makefile.local @@ -60,7 +60,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 -- 1.7.5.4