#! /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` FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe" echo "SHA256 checksums:" sha256sum $FILES echo for f in $FILES ; do gpg --detach-sign --armour "$f" FILES="$FILES $f.asc" done echo "To tag this release and upload it to the webserver, run:" echo git tag -s -m"'Survex $VERSION'" "v$VERSION" HOST=thyestes.tartarus.org echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION" echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"