From 5241f40dcfe2bf2287c0f81b7b4bbc463873f775 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 13 Nov 2016 18:15:45 +0100 Subject: [PATCH] Add a script to convert NEWS to GitHub release format --- scripts/github-news | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/github-news diff --git a/scripts/github-news b/scripts/github-news new file mode 100755 index 000000000..6b6532610 --- /dev/null +++ b/scripts/github-news @@ -0,0 +1,22 @@ +#!/bin/sh + +# Converts the last NEWS entry to GitHub format + +sed -n -e ' +n +:next + +# stop at the second header +/^[A-Za-z0-9_-]/q +# strip the leading indentation +s/^ // +# Make titles +s/^[A-Za-z0-9_-]/## \0/ +# Turn PR and Issue references to links +s%PR#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/pull/\1)%g +s%Issue#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/issue/\1)%g + +p +n +b next +' < NEWS -- 2.11.4.GIT