Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts/scriptCommon.py
diff options
context:
space:
mode:
authorPhil Nash2014-04-25 06:10:50 +0100
committerPhil Nash2014-04-25 06:10:50 +0100
commit18845dab7f2001264c82c31ad0162a07290ddcfd (patch)
tree909f4713f6f483524806490164c65a4d21a5d55b /scripts/scriptCommon.py
parent174049532e29106fd4e6eca9cbeceaf0ee6ed310 (diff)
downloadcatch3-18845dab7f2001264c82c31ad0162a07290ddcfd.tar.gz
Added script to extract stub for “release notes”
- gets last two commit hashes for the version file, gets the commit logs between those versions and parses out the messages
Diffstat (limited to 'scripts/scriptCommon.py')
-rw-r--r--scripts/scriptCommon.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/scriptCommon.py b/scripts/scriptCommon.py
index 5710ba9c..6ac381ad 100644
--- a/scripts/scriptCommon.py
+++ b/scripts/scriptCommon.py
@@ -1,4 +1,21 @@
import os
import sys
+import subprocess
-catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))) \ No newline at end of file
+catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
+
+def runAndCapture( args ):
+ child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE)
+ lines = []
+ line = ""
+ while True:
+ out = child.stdout.read(1)
+ if out == '' and child.poll() != None:
+ break
+ if out != '':
+ if out == '\n':
+ lines.append( line )
+ line = ""
+ else:
+ line = line + out
+ return lines \ No newline at end of file