1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/python
import sys
if len(sys.argv) != 2:
print("Missing or invalid arguments.")
print("Please provide release version number.")
exit(1)
version = sys.argv[1]
changelog = open('CHANGELOG.md', 'r')
lines = changelog.readlines()
currentRelease = False
print("## Release Notes")
for line in lines:
if not currentRelease and line.startswith("## ["):
currentRelease = True
elif currentRelease:
if line.startswith("## ["):
break # All done!
else:
print(line.rstrip())
print("## Downloads")
print("")
print(r'[](https://launchpad.net/~wereturtle/+archive/ubuntu/ppa) [](https://copr.fedorainfracloud.org/coprs/wereturtle/stable/) [](https://github.com/wereturtle/ghostwriter/releases/download/' + version + r'/ghostwriter_' + version + r'_win64_portable.zip)')
|