summaryrefslogtreecommitdiff
path: root/get-version
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-11-26 21:37:07 +0100
committerGuillem Jover <guillem@debian.org>2015-02-11 04:42:42 +0100
commite1e109ad87dab86d155524f02417fc20e2874d59 (patch)
treed10edfcd9ce22c52f216ca585ab7dab208d685e5 /get-version
parent57554c38e9a2208a4c0e004b67ceda98b7439fda (diff)
downloaddpkg-e1e109ad87dab86d155524f02417fc20e2874d59.tar.gz
build: Map % back to :
Although we do not have any epochs (and should never need one!), it serves as an example script for others to use.
Diffstat (limited to 'get-version')
-rwxr-xr-xget-version6
1 files changed, 3 insertions, 3 deletions
diff --git a/get-version b/get-version
index 6c39065bd..6ae9c0b1d 100755
--- a/get-version
+++ b/get-version
@@ -22,9 +22,9 @@ if [ -f .dist-version ]; then
# Get the version from the file distributed in the tarball.
version=$(cat .dist-version)
elif [ -d .git ]; then
- # Get the version from the git repository. Since tags can't contain
- # tildes, we use underscore instead. Reverse that switch here.
- version=$(git describe --abbrev=4 HEAD 2>/dev/null | tr _ ~)
+ # Get the version from the git repository. Since tags cannot contain colons
+ # or tildes, we use percent and underscore instead. Reverse that switch here.
+ version=$(git describe --abbrev=4 HEAD 2>/dev/null | tr %_ :~)
# Check if we are on a dirty checkout.
git update-index --refresh -q >/dev/null