From: Baruch Siach <baruch@tkos.co.il>
To: barebox@lists.infradead.org
Subject: [PATCH] setlocalversion: detect unannotated tags
Date: Thu, 1 Jul 2010 10:49:02 +0300 [thread overview]
Message-ID: <c35d1dea198c8447bd4eedd83bb0a8f5d7236365.1277970465.git.baruch@tkos.co.il> (raw)
'git describe' shows:
v2009.12.0-178-gdc882c3
I.e. git doesn't find the more recent v2010.06.0 unannotated tag. The top-level
Makefile then takes the '-178-gdc882c3' part and attaches it to '2010.06.0'
(the current version string), making the output of the 'version' command:
barebox 2010.06.0-00178-gcc827a1 (Jul 1 2010 - 09:02:45)
which is plain wrong. Add the --tags option to make 'git describe' look for
unannotated tags as well.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
scripts/setlocalversion | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 83b7512..4f9dafe 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -12,7 +12,7 @@ cd "${1:-.}" || usage
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
# Do we have an untagged version?
if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
- if tag=`git describe 2>/dev/null`; then
+ if tag=`git describe --tags 2>/dev/null`; then
echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
fi
fi
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2010-07-01 7:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 7:49 Baruch Siach [this message]
2010-07-01 12:00 ` Sascha Hauer
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=c35d1dea198c8447bd4eedd83bb0a8f5d7236365.1277970465.git.baruch@tkos.co.il \
--to=baruch@tkos.co.il \
--cc=barebox@lists.infradead.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