From: Jakub Narebski <jnareb@gmail.com>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org
Subject: [PATCH 3/3] Refresh VERSION file when building distribution tarball in "make dist"
Date: Fri, 1 Jun 2007 18:34:28 +0200 [thread overview]
Message-ID: <200706011834.28911.jnareb@gmail.com> (raw)
In-Reply-To: <20070531131615.GA27044@diku.dk>
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 <jnareb@gmail.com>
---
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
next prev parent reply other threads:[~2007-06-01 22:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 8:54 [PATCH (tig)] Infrastructure for tig rpm builds Jakub Narebski
2007-05-29 20:29 ` Jonas Fonseca
2007-05-29 23:31 ` Jakub Narebski
2007-05-31 13:16 ` Jonas Fonseca
2007-06-01 16:24 ` [PATCH 1/3] Remove PDF version of manual from being build and installed Jakub Narebski
2007-06-02 16:08 ` Jonas Fonseca
2007-06-01 16:27 ` [PATCH 2/3] Include documentation sources for rpmbuild with '--without docs' Jakub Narebski
2007-06-01 16:34 ` Jakub Narebski [this message]
2007-06-02 16:12 ` [PATCH 3/3] Refresh VERSION file when building distribution tarball in "make dist" Jonas Fonseca
2007-06-02 17:52 ` [RFC/PATCH 4/3] Simplify naming (versioning) of non-release tig tarball and rpm file Jakub Narebski
2007-06-03 9:11 ` Jonas Fonseca
2007-06-03 21:12 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706011834.28911.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).