diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-19 01:11:48 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-19 01:11:48 +0000 |
commit | ee715531806215d3d41b86050234404c87517748 (patch) | |
tree | 7d58f079ee59f89beb6c541fd4da9a313688f385 | |
parent | 49a722d3d233fe2759d2ca5fbd7b80477c99767a (diff) |
new take on getting SVN revision number
git-svn-id: svn://localhost/ardour2/branches/3.0@13881 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | wscript | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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() |