35d2823601
For the release candidates, allow passing the version (e.g. "3.1.1-rc") to post-release.sh on the command line and document this. Also don't commit automatically, this is annoying, especially as the script doesn't check for errors. Finally, fix the problem with the CHM file name: it must be zipped, presumably to avoid problems with some firewalls blocking downloading CHM files (as there is really no advantage in compressing the already compressed CHM file otherwise).
28 lines
915 B
Bash
Executable File
28 lines
915 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
|
set -e
|
|
|
|
topdir=`dirname $0`/../..
|
|
|
|
# Build the file list for sha1sums, from `docs/release.md`
|
|
declare -a files=(`sed -n '/^## Download Verification/,/^## Binaries/p' $topdir/docs/release.md | sed -n -E 's/^\s*0{40}\s{2}(wx.*)/\1/p'`)
|
|
|
|
# Get the release version unless it's given explicitly on the command line.
|
|
if [ -z $1 ]; then
|
|
ver_string=`grep '#define wxVERSION_STRING ' $topdir/include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
|
|
else
|
|
ver_string=$1
|
|
fi
|
|
|
|
for i in "${files[@]}"
|
|
do
|
|
# compute sha1sum
|
|
sha1sum=`sha1sum $topdir/distrib/release/$ver_string/$i | cut -d' ' -f1`
|
|
|
|
# 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/" $topdir/docs/release.md
|
|
done
|
|
|
|
echo "File $topdir/docs/release.md updated after $ver_string release, don't forget to commit it."
|