diff options
| author | Phil Nash | 2014-04-25 06:10:50 +0100 |
|---|---|---|
| committer | Phil Nash | 2014-04-25 06:10:50 +0100 |
| commit | 18845dab7f2001264c82c31ad0162a07290ddcfd (patch) | |
| tree | 909f4713f6f483524806490164c65a4d21a5d55b /scripts/scriptCommon.py | |
| parent | 174049532e29106fd4e6eca9cbeceaf0ee6ed310 (diff) | |
| download | catch3-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.py | 19 |
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 |