summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-19 01:11:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-19 01:11:48 +0000
commitee715531806215d3d41b86050234404c87517748 (patch)
tree7d58f079ee59f89beb6c541fd4da9a313688f385
parent49a722d3d233fe2759d2ca5fbd7b80477c99767a (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--wscript7
1 files 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()