Add scripts for automating more parts of the release process

Update dates in various files before the release automatically.

Also automatically update SHA-1 of the release files both before the
release (to zero them) and afterwards (to use the correct values).

Closes https://github.com/wxWidgets/wxWidgets/pull/443
This commit is contained in:
Cătălin Răceanu
2017-03-23 02:55:24 +02:00
committed by Vadim Zeitlin
parent 9b65905c4b
commit 45c33d2a17
3 changed files with 94 additions and 14 deletions

22
build/tools/post-release.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
# Exit immediately if a command exits with a non-zero status.
set -e
# Build the file list for sha1sums, from `docs/release.md`
declare -a files=(`sed -n '/^## Download Verification/,/^## Binaries/p' ../../docs/release.md | sed -n -E 's/^\s*0{40}\s{2}(wx.*)/\1/p'`)
# Get the release version
ver_string=`grep '#define wxVERSION_STRING ' ./../../include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
for i in "${files[@]}"
do
# compute sha1sum
sha1sum=`sha1sum ./../../distrib/release/$ver_string/$i`
# save the sha1sum for this file
sed -i -E "/^\s*[0]{40}\s{2}wx/ s/(^\s*)[0]{40}(\s{2}$i)/\1$sha1sum\2/" ./../../docs/release.md
done
# Commit sha1sum related changes
git commit -m "Update released files sha1sums after $ver_string release" ./../../docs/release.md