diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-17 00:16:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-17 00:16:17 +0100 |
| commit | 93c08c70b8ffeb9c6e5b9c8a75f429a9b89907c0 (patch) | |
| tree | 04b6ce991685dd586bde834a07ef5b75482a8411 /wscript | |
| parent | 65470d9a8ee57b19271f65324d7a8ab0c00960f2 (diff) | |
Debug.
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -224,7 +224,7 @@ def git_revision(): cmd = "LANG= git log --abbrev HEAD^..HEAD ." output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() o = output[0].decode('utf-8') - return o.replace ("commit ", "")[0:10] + return o.replace("commit ", "")[0:10] def dist(ctx): r = git_revision() @@ -242,13 +242,17 @@ def dist(ctx): def create_version_cc(version, cxx_flags): commit = git_revision() + print "1: ", commit if commit is None and os.path.exists('.git_revision'): - f = open('.git_revision') + f = open('.git_revision', 'r') commit = f.readline().strip() + print "2: ", commit if commit is None: commit = 'release' + print commit + try: text = '#include "version.h"\n' text += 'char const * dcpomatic_git_commit = \"%s\";\n' % commit |
