From 7468909bd2ba66ae41d98df19cd80106e6463834 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Thu, 23 Jun 2016 22:00:35 +0200 Subject: 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 --- scripts/getver.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts') 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" -- cgit v1.2.3