[Pkg-voip-commits] [dahdi-tools] 252/285: make_version: cut off slashes in git
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:19:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit 4676ad6671c7182c9b556dc3174529153d97b1dd
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date: Wed Oct 21 12:08:41 2015 +0300
make_version: cut off slashes in git
If we are based on a git tag with a name (such as 'upstream/2.10.2'),
remove everything up to the slash.
While we're at it, remove a leading '1%' that gets into the version
string as part of the version tag (a Debian version with an epoch: '1:'
is converted to '1%').
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
---
build_tools/make_version | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build_tools/make_version b/build_tools/make_version
index 319842b..5bee529 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -68,6 +68,8 @@ elif [ -d ${1}/.git ]; then
# options.
VERSION=GIT-`git rev-parse --short --verify HEAD`${MODIFIED}
fi
+ VERSION=${VERSION##*/} # Remove leading slashes: upsteram/2.10.2
+ VERSION=${VERSION#[1-9]%} # Remove 1% from tag (tag from Debian epoch)
echo ${VERSION}
else
PARTS=`LANG=C git log --pretty=full | grep -F "git-svn-id:" | head -1 | awk '{print $2;}' | sed -e s:^.*/svn/$2/:: | sed -e 's:/: :g' | sed -e 's/@.*$//g'`
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list