source:
git/make_release
@
  0a681a7
        
        | Last change on this file since 0a681a7 was db641eb, checked in by , 16 months ago | |
|---|---|
            
  | 
        |
| File size: 1.4 KB | |
| Rev | Line | |
|---|---|---|
| [d7acd89] | 1 | #! /bin/sh | 
| [ae1309f] | 2 | |
| [088d34f] | 3 | # This script automates most of the process on making a new release. | 
| 4 | ||
| [098acb1] | 5 | set -e | 
| 6 | ||
| [ae1309f] | 7 | rel=yes | 
| [e66be9a] | 8 | if test x"$1" = x-t ; then | 
| [ae1309f] | 9 | rel= | 
| [f30265a0] | 10 | shift | 
| [d7acd89] | 11 | fi | 
| [dd7674d] | 12 | |
| [ae1309f] | 13 | if test x"$rel" = xyes ; then | 
| [9d5aa63] | 14 | # Check there are no uncommitted changes. | 
| 15 | if git commit -a --dry-run >/dev/null 2>/dev/null ; then | |
| 16 | echo 'There are uncommitted changes - please rectify' | |
| [d2980d2] | 17 | echo 'If you just want to test, run with option -t' | 
| 18 | exit 1 | |
| 19 | fi | |
| [098acb1] | 20 | |
| [d2980d2] | 21 | test ! -f Makefile || make distclean | 
| 22 | cp -u /usr/share/misc/config.guess . | |
| 23 | cp -u /usr/share/misc/config.sub . | |
| [f5baa8c] | 24 | mv INSTALL INSTALL.keep | 
| [d2980d2] | 25 | autoreconf --force -i | 
| [f5baa8c] | 26 | mv INSTALL.keep INSTALL | 
| [d2980d2] | 27 | ./configure CC=gcc CXX=g++ | 
| [148c993] | 28 | # Don't error out on new GCC8 and GCC9 warnings for now. | 
| 29 | make CFLAGS='-Werror' CXXFLAGS='-Werror -Wno-error=cast-function-type -Wno-error=deprecated-copy -Wno-error=ignored-qualifiers' | |
| [8ea94ea] | 30 | VALGRIND=valgrind make distcheck VERBOSE=1 | 
| [f78ad72] | 31 | else | 
| [d2980d2] | 32 | make dist | 
| [e719df1] | 33 | fi | 
| [098acb1] | 34 | |
| [d2980d2] | 35 | if test x"$rel" = xyes ; then | 
| 36 | rm -rf "$tardir" | |
| [004b1c2] | 37 | else | 
| 38 | exit 0 | |
| [d2980d2] | 39 | fi | 
| [7b12c6d] | 40 | |
| [9c9fd6b] | 41 | VERSION=`sed 's/^VERSION *= *//p;d' Makefile` | 
| [8430216] | 42 | FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe" | 
| [f4671eb] | 43 | echo "SHA256 checksums:" | 
| 44 | sha256sum $FILES | |
| [8430216] | 45 | echo | 
| 46 | ||
| [179a57b] | 47 | for f in $FILES ; do | 
| [201310c] | 48 | gpg --detach-sign --armour "$f" | 
| [179a57b] | 49 | FILES="$FILES $f.asc" | 
| 50 | done | |
| 51 | ||
| [8430216] | 52 | echo "To tag this release and upload it to the webserver, run:" | 
| [dc3e0c1] | 53 | echo git tag -s -m"'Survex $VERSION'" "v$VERSION" | 
| [e11c235] | 54 | |
| [f4671eb] | 55 | HOST=thyestes.tartarus.org | 
| [e11c235] | 56 | echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION" | 
| [8430216] | 57 | echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION" | 
Note: See TracBrowser
        for help on using the repository browser.
    