change tool to work in RST instead of MD
#!/bin/bash
#
# Collects the pull-requests since the latest release and
-# aranges them in the CHANGES.txt file.
+# aranges them in the CHANGELOG.rst file.
#
# This is a script to be run before releasing a new version.
#
set -u # Treat unset variables as an error when substituting.
set -x # Print command traces before executing command.
-CHANGES=CHANGELOG.md
+CHANGES=CHANGELOG.rst
# Elaborate today's release header
-HEADER="## Version $1 ($(date '+%B %d, %Y'))"
+HEADER="Version $1 ($(date '+%B %d, %Y'))"
+LEN=${#HEADER}
+UNDERLINE=$(printf "%0.s-" $(seq 1 $LEN))
+
cat <<END > newchanges
-# Changelog
+Changelog
+=========
-## Version $1 ($(date '+%B %d, %Y'))
+$HEADER
+$UNDERLINE
END
@@ -32,4 +37,3 @@ tail -n+2 $CHANGES >> newchanges
# Replace old CHANGES with new file
mv newchanges $CHANGES
-
