From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Narebski Subject: [PATCH 3/3] Refresh VERSION file when building distribution tarball in "make dist" Date: Fri, 1 Jun 2007 18:34:28 +0200 Message-ID: <200706011834.28911.jnareb@gmail.com> References: <200705281054.05376.jnareb@gmail.com> <200705300131.17137.jnareb@gmail.com> <20070531131615.GA27044@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org To: Jonas Fonseca X-From: git-owner@vger.kernel.org Sat Jun 02 00:26:21 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1HuFZa-00024O-PU for gcvg-git@gmane.org; Sat, 02 Jun 2007 00:26:19 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758345AbXFAW0J (ORCPT ); Fri, 1 Jun 2007 18:26:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757116AbXFAW0I (ORCPT ); Fri, 1 Jun 2007 18:26:08 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]:53670 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758311AbXFAW0F (ORCPT ); Fri, 1 Jun 2007 18:26:05 -0400 Received: by ug-out-1314.google.com with SMTP id j3so325507ugf for ; Fri, 01 Jun 2007 15:26:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=q5tT28eXPMMmUETDC7BDrz7od1K1DKnh6/9x+gO3jZmyudDP8Ibh0Gz+DDHf5Bx8g4UGuu7pbo5nm8c2bbbWRQNP5Od7CDtO7rH4vBKaH5AS2tR7n4DN/YzJOw8OwxpfKK9VUVsxNuFrMODahPNekPZiRhC+fNM8EANUIo1JyDs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=SAEjgoSQrF5UQeZmzX3rgnIdsyJwRQfqJfkJgMlgLA9m4xkUuttDOFUUnIZEYJCDvuX/lyifXOQswVvXa77sA9jSSC31a9Sqg8dc4N/2Mvh/tlOQZUq2msk6IG4mJBp4znOsTWxnRnnOrv6jnkKHYcm74PDEPYn17NeRozmUpY0= Received: by 10.67.93.2 with SMTP id v2mr1060077ugl.1180736764732; Fri, 01 Jun 2007 15:26:04 -0700 (PDT) Received: from host-89-229-25-173.torun.mm.pl ( [89.229.25.173]) by mx.google.com with ESMTP id g1sm1047910muf.2007.06.01.15.26.02; Fri, 01 Jun 2007 15:26:04 -0700 (PDT) User-Agent: KMail/1.9.3 In-Reply-To: <20070531131615.GA27044@diku.dk> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Overwrite contents of VERSION file from the HEAD revision with the current version (at the time of building), so VERSION file in the tarball generated by "make dist" (and which follows also rpm package generated by "make rpm") is up to date. Otherwise for example when building rpm it will be compiled with wrong version string. Signed-off-by: Jakub Narebski --- On Thu, 31 May 2007, Jonas Fonseca wrote: > Maybe you can test the newly released tig 0.7 tarball? > > Your patch was added as commit 8cdf56913e7e486bb3f527c24ee4a4d19f2a4f61, > with a few minor adjustments. One of those changes was using HEAD version of VERSION file in "make dist", instead of regenerating it and replacing it with the one containing _current_ version in the tar file. $ make rpm sed -e 's/@@VERSION@@/0.7.4.g1995120/g' < tig.spec.in > tig.spec git-archive --format=tar --prefix=tig-0.7.4.g1995120/ HEAD > tig-0.7.4.g1995120.tar tar rf tig-0.7.4.g1995120.tar tig-0.7.4.g1995120/tig.spec gzip -f -9 tig-0.7.4.g1995120.tar rpmbuild -ta tig-0.7.4.g1995120.tar.gz Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.72336 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.72336 make[1]: Entering directory `/home/local/builddir/BUILD/tig-0.7.4.g1995120' cc -Wall -O2 '-DVERSION="0.7.git"' tig.c -lcurses -o tig asciidoc -b docbook -d manpage -aversion=0.7.git tig.1.txt xmlto -m manpage.xsl man tig.1.xml [...] Note the mismatch in the versions: 0.7.4.g1995120 vs 0.7.git (by the way, shouldn't it be 0.7.tig?), even when building from live repo, and not from tarball. This is 3rd patch in the series, but it is actually independent on the rest, and can be applied in any order. Makefile | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 0e42de6..bc8086f 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,10 @@ dist: tig.spec git-archive --format=tar --prefix=$(TARNAME)/ HEAD > $(TARNAME).tar @mkdir -p $(TARNAME) @cp tig.spec $(TARNAME) - tar rf $(TARNAME).tar $(TARNAME)/tig.spec + echo $(VERSION) > $(TARNAME)/VERSION + tar rf $(TARNAME).tar \ + $(TARNAME)/tig.spec \ + $(TARNAME)/VERSION @rm -rf $(TARNAME) gzip -f -9 $(TARNAME).tar -- 1.5.2