forked from KDE/ghostwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreleaseNotes.py
More file actions
executable file
·35 lines (25 loc) · 1.25 KB
/
releaseNotes.py
File metadata and controls
executable file
·35 lines (25 loc) · 1.25 KB
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
32
33
34
#!/bin/python
# SPDX-FileCopyrightText: 2022 Megan Conkle <megan.conkle@kdemail.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
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)')