aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2016-06-23 22:00:35 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-23 22:00:35 +0200
commit7468909bd2ba66ae41d98df19cd80106e6463834 (patch)
tree8f37781d0fb4d277722601bc3114d977f2ba60b7 /scripts
parent527aa5f3b2b98ed9136edbaca7e48317c6111b3c (diff)
downloadmaster-187ad058-7468909bd2ba66ae41d98df19cd80106e6463834.tar.gz
master-187ad058-7468909bd2ba66ae41d98df19cd80106e6463834.tar.bz2
master-187ad058-7468909bd2ba66ae41d98df19cd80106e6463834.zip
scripts/getver.sh: generate revision relative to the trunk tag.
The first commit was tagged as "trunk". As there are missing commits for some reason in the tree, the relative number of commits to the tag is now 37507. This will mean some confusion to the users when reflecting to the revision numbers, so the git commit ID is added to the revision to clearly indicate it's from the nrew github tree. Example is r37487-g441a9c8. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getver.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index 6cf7797519..445a43e8b8 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -18,8 +18,7 @@ try_svn() {
try_git() {
git rev-parse --git-dir >/dev/null 2>&1 || return 1
- REV="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $0); print $1 }')"
- REV="${REV:+r$REV}"
+ REV="$(git describe --tags | sed "s/trunk-\([0-9]*-.*\)/\1/g")"
[ -n "$REV" ]
}
@@ -30,5 +29,5 @@ try_hg() {
[ -n "$REV" ]
}
-try_version || try_svn || try_git || try_hg || REV="unknown"
+try_version || try_git || try_hg || REV="unknown"
echo "$REV"