Add a script to convert NEWS to GitHub release format
[geany-mirror.git] / scripts / github-news
blob6b653261082cfa9db7a82f7dd8c094fdf441732d
1 #!/bin/sh
3 # Converts the last NEWS entry to GitHub format
5 sed -n -e '
7 :next
9 # stop at the second header
10 /^[A-Za-z0-9_-]/q
11 # strip the leading indentation
12 s/^ //
13 # Make titles
14 s/^[A-Za-z0-9_-]/## \0/
15 # Turn PR and Issue references to links
16 s%PR#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/pull/\1)%g
17 s%Issue#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/issue/\1)%g
21 b next
22 ' < NEWS