[Pkg-ganeti-devel] [ganeti] 95/165: Support slashes in git version number

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Aug 11 13:53:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ganeti.

commit a8656576d7d82c81d2799826ea7489fcb24800a8
Author: Klaus Aehlig <aehlig at google.com>
Date:   Mon Mar 30 11:22:31 2015 +0200

    Support slashes in git version number
    
    ...as they routinely occur in the output of 'git describe'.
    To stay with the simple sed-based approach, we accept to
    lose the symbol that will also cause trouble in our Haskell file,
    the double quote. It is quite rare in the output of git-describe
    and we just substitute it away.
    
    Signed-off-by: Klaus Aehlig <aehlig at google.com>
    Reviewed-by: Helga Velroyen <helgav at google.com>
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index de3b4f1..17620bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2211,7 +2211,7 @@ epydoc.conf: epydoc.conf.in $(REPLACE_VARS_SED)
 
 vcs-version:
 	if test -d .git; then \
-	  git describe > $@; \
+	  git describe | tr '"' - > $@; \
 	elif test ! -f $@ ; then \
 	  echo "Cannot auto-generate $@ file"; exit 1; \
 	fi
@@ -2236,7 +2236,7 @@ src/Ganeti/Version.hs: src/Ganeti/Version.hs.in \
 	vcs-version $(built_base_sources)
 	set -e; \
 	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
-	sed -e "s/%ver%/$$VCSVER/" < $< > $@
+	sed -e 's"%ver%"'"$$VCSVER"'"' < $< > $@
 
 src/Ganeti/Hs2Py/ListConstants.hs: src/Ganeti/Hs2Py/ListConstants.hs.in \
 				   src/Ganeti/Constants.hs \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list