diff options
author | Brad King <brad.king@kitware.com> | 2017-06-02 15:46:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-02 18:18:34 (GMT) |
commit | c913ab61aea87439d6822632a8e74a28a287a460 (patch) | |
tree | b7d09430a147fea291e1e974e07cfc14cca9a917 /Utilities/Release | |
parent | 3216c2178cfcc75d48f383a76ccff4aa052b5fdc (diff) | |
download | CMake-c913ab61aea87439d6822632a8e74a28a287a460.zip CMake-c913ab61aea87439d6822632a8e74a28a287a460.tar.gz CMake-c913ab61aea87439d6822632a8e74a28a287a460.tar.bz2 |
Utilities/Release: Add script to consolidate release notes
Diffstat (limited to 'Utilities/Release')
-rwxr-xr-x | Utilities/Release/consolidate-relnotes.bash | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Utilities/Release/consolidate-relnotes.bash b/Utilities/Release/consolidate-relnotes.bash new file mode 100755 index 0000000..91307ac --- /dev/null +++ b/Utilities/Release/consolidate-relnotes.bash @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e + +usage='usage: consolidate-relnotes.bash <new-release-version> <prev-release-version>' + +die() { + echo "$@" 1>&2; exit 1 +} + +test "$#" = 2 || die "$usage" + +files="$(ls Help/release/dev/* | grep -v Help/release/dev/0-sample-topic.rst)" +title="CMake $1 Release Notes" +underline="$(echo "$title" | sed 's/./*/g')" +echo "$title +$underline + +.. only:: html + + .. contents:: + +Changes made since CMake $2 include the following." > Help/release/"$1".rst +tail -q -n +3 $files >> Help/release/"$1".rst +sed -i "/^ $2 / i\\ + $1 <$1>" Help/release/index.rst +rm $files |