]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Use format +git:XXXXXXXX
authorTravis Cross <tc@traviscross.com>
Sat, 9 Feb 2013 09:48:52 +0000 (09:48 +0000)
committerTravis Cross <tc@traviscross.com>
Sat, 9 Feb 2013 09:50:23 +0000 (09:50 +0000)
The colon is kinder to Debian than a dash and seems stylistically
better.  The dash feels as though it introduces another version level,
e.g. -rc1-alpha2.  We could just do +gitXXXXXXXX but as git commit
hashes are in lowercase hexadecimal the result can be something really
ugly like +giteaf0cb71.  It's also easier to select the commit hash
for a copy/paste operation when there is something to separate it.

Makefile.am

index a42ce3624d56e564f4a7397841161259f60b2c73..c6e2f9bd2bdd1b1fe419b35cf693b105eb08b737 100644 (file)
@@ -29,7 +29,7 @@ BUILT_SOURCES = version.h
 version.h: version.h.tmp Makefile $(mtr_SOURCES)
        @cat $< > $@; \
        if [ -d .git ] && [ -n "$$(which git)" ]; then \
-         xver="+git-$$(git rev-list -n1 --abbrev=8 --abbrev-commit HEAD)"; \
+         xver="+git:$$(git rev-list -n1 --abbrev=8 --abbrev-commit HEAD)"; \
          sed \
            -e "/#define *MTR_VERSION */{s/\"\([^\"]*\)\"/\"\1$$xver\"/;}" \
            $< > $@; \