From 3ed313c9d34770376d6326fa7b291d0969d581a5 Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Tue, 31 Mar 2020 15:22:39 +0200 Subject: Add a rudimentary script to generate release changelog. The idea is very simple: use the list in the release branch to know which changelog entries to include, but do the work of removing these entries and consolidating the released changelog in the master branch (so that it is applied both to the master branch and to the release branch following the backporting process). --- dev/tools/generate-release-changelog.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 dev/tools/generate-release-changelog.sh (limited to 'dev') diff --git a/dev/tools/generate-release-changelog.sh b/dev/tools/generate-release-changelog.sh new file mode 100755 index 0000000000..ef061d31d9 --- /dev/null +++ b/dev/tools/generate-release-changelog.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo "Usage: $0 BRANCH" + exit +fi + +branch=$1 + +git checkout $branch +git pull +changelog_entries_with_title=$(ls doc/changelog/*/*.rst) +changelog_entries_no_title=$(echo "$changelog_entries_with_title" | grep -v "00000-title.rst") +git checkout master +git pull +for f in $changelog_entries_with_title; do + if [ -f "$f" ]; then + cat "$f" >> released.rst + else + echo "Warning: $f is missing in master branch." + fi +done +for f in $changelog_entries_no_title; do + if [ -f "$f" ]; then + git rm "$f" + fi +done +echo "Changelog written in released.rst. Move its content to a new section in doc/sphinx/changes.rst." -- cgit v1.2.3