From ee715531806215d3d41b86050234404c87517748 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 19 Jan 2013 01:11:48 +0000 Subject: new take on getting SVN revision number git-svn-id: svn://localhost/ardour2/branches/3.0@13881 d708f5d6-7413-0410-9779-e7cbd77b26cf --- wscript | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wscript b/wscript index 78f9e288de..92b6383fef 100644 --- a/wscript +++ b/wscript @@ -58,9 +58,8 @@ else: # Version stuff def fetch_svn_revision (path): - # the fifth line has the revision number. we can't grep because of i18n issues changing the string - cmd = "svn info " + path + " | sed -n '5s/^[^:]*:[ \t][ \t]*//p'" - return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() + cmd = "svnversion | cut -d: -f1" + return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].rstrip(os.linesep) def fetch_gcc_version (CC): cmd = "LANG= %s --version" % CC @@ -111,7 +110,7 @@ def create_stored_revision(): try: text = '#include "ardour/svn_revision.h"\n' text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev - print('Writing svn revision info to libs/ardour/svn_revision.cc') + print('Writing svn revision info to libs/ardour/svn_revision.cc using ', rev) o = open('libs/ardour/svn_revision.cc', 'w') o.write(text) o.close() -- cgit v1.2.3