summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2009-08-01 15:14:25 +0100
committerRoger Leigh <rleigh@debian.org>2009-08-01 15:14:25 +0100
commite0ea93c0ef4b2e0cf8122147add98f382fa66004 (patch)
tree82f10b1288fdc811b2698b13ddb1fc15bc5f8abb /scripts
parent88c68712abeef2c30cac98f280d5612de6c5bc50 (diff)
downloadschroot-e0ea93c0ef4b2e0cf8122147add98f382fa66004.tar.gz
scripts/git-version: Allow hyphens in version number
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-version4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/git-version b/scripts/git-version
index 88bf11bd..eb522fa7 100755
--- a/scripts/git-version
+++ b/scripts/git-version
@@ -2,8 +2,8 @@
TAG="$(git describe --abbrev=0 --match='release/*')"
PKGVER="${TAG#release/}"
-PACKAGE="$(echo "$PKGVER" | sed -e 's/^\(.*\)-\(.*\)$/\1/')"
-VERSION="$(echo "$PKGVER" | sed -e 's/^\(.*\)-\(.*\)$/\2/')"
+PACKAGE="$(echo "$PKGVER" | sed -e 's/^\([^-]*\)-\(.*\)$/\1/')"
+VERSION="$(echo "$PKGVER" | sed -e 's/^\([^-]*\)-\(.*\)$/\2/')"
COMMIT="$(git rev-parse "$TAG^{}")"
COMMIT_DATE="$(git log -1 --date=iso "$COMMIT" --pretty="format:%ad")"