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

summaryrefslogtreecommitdiffhomepage
path: root/scripts/releaseNotes.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/releaseNotes.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/releaseNotes.py')
-rw-r--r--scripts/releaseNotes.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/releaseNotes.py b/scripts/releaseNotes.py
new file mode 100644
index 00000000..5eb56ade
--- /dev/null
+++ b/scripts/releaseNotes.py
@@ -0,0 +1,33 @@
+import os
+
+from scriptCommon import catchPath
+from scriptCommon import runAndCapture
+
+rootPath = os.path.join( catchPath, 'include/' )
+versionPath = os.path.join( rootPath, "internal/catch_version.hpp" )
+
+
+hashes = runAndCapture( ['git', 'log', '-2', '--format="%H"', versionPath] )
+lines = runAndCapture( ['git', 'log', hashes[1] + ".." + hashes[0], catchPath] )
+
+prevLine = ""
+messages = []
+dates = []
+for line in lines:
+ if line.startswith( "commit"):
+ pass
+ elif line.startswith( "Author:"):
+ pass
+ elif line.startswith( "Date:"):
+ dates.append( line[5:].lstrip() )
+ pass
+ elif line == "" and prevLine == "":
+ pass
+ else:
+ messages.append( line )
+ prevLine = line
+
+print "All changes between {0} and {1}:\n".format( dates[-1], dates[0] )
+
+for line in messages:
+ print line