#! /bin/sh # This script automates most of the process on making a new release. set -e rel=yes if test x"$1" = x-t ; then rel= shift fi if test x"$rel" = xyes ; then # Check there are no uncommitted changes. if git commit -a --dry-run >/dev/null 2>/dev/null ; then echo 'There are uncommitted changes - please rectify' echo 'If you just want to test, run with option -t' exit 1 fi test ! -f Makefile || make distclean cp -u /usr/share/misc/config.guess . cp -u /usr/share/misc/config.sub . mv INSTALL INSTALL.keep autoreconf --force -i mv INSTALL.keep INSTALL ./configure CC=gcc CXX=g++ # Don't error out on new GCC8 and GCC9 warnings for now. make CFLAGS='-Werror' CXXFLAGS='-Werror -Wno-error=cast-function-type -Wno-error=deprecated-copy -Wno-error=ignored-qualifiers' VALGRIND=valgrind make distcheck VERBOSE=1 else make dist fi if test x"$rel" = xyes ; then rm -rf "$tardir" else exit 0 fi VERSION=`sed 's/^VERSION *= *//p;d' Makefile` HOST=thyestes.tartarus.org echo 'Tagging' git tag -s -m"Survex $VERSION" "v$VERSION" echo 'Pushing' git push --follow-tags ssh "$HOST" bin/survex-git-mirror win32=survex-win32-$VERSION.exe echo "Download and unzip $win32 into `pwd`" while test ! -f "$win32" ; do sleep 1 ; done FILES="survex-$VERSION.tar.gz $win32" echo "SHA256 checksums:" sha256sum $FILES echo for f in $FILES ; do gpg --detach-sign --armour "$f" FILES="$FILES $f.asc" done echo "To upload to the webserver, run:" echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION" echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"