source: git/make_release @ 55a0527

RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernlogstereowalls-datawalls-data-hanging-as-warning
Last change on this file since 55a0527 was a6bb1fa6, checked in by Olly Betts <olly@…>, 11 years ago

cope with multiple survex tarballs

  • Property mode set to 100755
File size: 2.6 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[098acb1]3set -e
4
[ae1309f]5rel=yes
[e66be9a]6if test x"$1" = x-t ; then
[ae1309f]7   rel=
[f30265a0]8   shift
[d7acd89]9fi
[dd7674d]10
[ae1309f]11if test x"$rel" = xyes ; then
[9d5aa63]12  # Check there are no uncommitted changes.
13  if git commit -a --dry-run >/dev/null 2>/dev/null ; then
14    echo 'There are uncommitted changes - please rectify'
[d2980d2]15    echo 'If you just want to test, run with option -t'
16    exit 1
17  fi
[098acb1]18
[d2980d2]19  test ! -f Makefile || make distclean
20  cp -u /usr/share/misc/config.guess .
21  cp -u /usr/share/misc/config.sub .
22  autoreconf --force -i
23  ./configure CC=gcc CXX=g++
[1a2570d]24  make distcheck
[44ef5ec6]25  # FIXME: setting c89 doesn't define unix and suppresses getc_unlocked().
[d2980d2]26  # Tell the preprocessor to be C89 - this makes it reject // comments
27  # FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
28  # FIXME   CXXFLAGS="-Werror"
[f78ad72]29else
[d2980d2]30  make dist
[e719df1]31fi
[098acb1]32
[d2980d2]33# Perform mingw build on a clean unpacked source tree from the release tarball
34# so that (a) we don't need to "make distclean" on the source tree and (b) we
35# ensure that any files required to build the mingw version and installer
36# package are actually shipped in the source tarball.
[a6bb1fa6]37tarball=`ls -1t survex-1*.tar.gz|head -n1`
[d2980d2]38tardir=`basename "$tarball" .tar.gz`
39rm -rf "$tardir"
40tar xf "$tarball"
41cd "$tardir"
[098acb1]42
[0fd6750]43test -n "$build_platform" || build_platform=`sh config.guess`
44SAVE_PATH=$PATH
[d380cd6]45for wxc in \
46  /usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8 \
47  /usr/lib/wx/config/i686-w64-mingw32-msw-unicode-release-static-2.8 \
48  "" ; do
49  if test -z "$wxc" ; then
50    echo "wx-config for mingw not found" >&2
51    exit 1
52  fi
53  if test -x "$wxc" ; then
54    CC=`$wxc --cc`
55    CXX=`$wxc --cxx`
56    break
57  fi
58done
59case $CC in
60  *i586-mingw32msvc-gcc)
61    # debian mingw32 package
62    PATH=/usr/i586-mingw32msvc/bin:$PATH
63    ;;
64  *i386-mingw32msvc-gcc)
65    # debian mingw32 package
66    PATH=/usr/i386-mingw32msvc/bin:$PATH
67    ;;
68esac
69
[d2980d2]70# Passing -Werror to configure causes AC_CHECK_FUNCS to fail, so pass it to
71# make instead.
[366976d]72./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CXXFLAGS="-fno-strict-aliasing -Werror" WX_CONFIG="$wxc" LDFLAGS='-s -static'
[0fd6750]73make CFLAGS=-Werror
74make mingw_iss
75PATH=$SAVE_PATH
76
[d2980d2]77mv survex-win32-*.exe ..
78cd ..
79
80if test x"$rel" = xyes ; then
81  rm -rf "$tardir"
82fi
[7b12c6d]83
[9c9fd6b]84VERSION=`sed 's/^VERSION *= *//p;d' Makefile`
[8430216]85FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe"
86echo "SHA1 checksums:"
87sha1sum $FILES
88echo
89
90echo "To tag this release and upload it to the webserver, run:"
[9d5aa63]91echo git tag -m"'Tagging $VERSION'" "$VERSION"
[e11c235]92
93HOST=atreus.tartarus.org
94echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION"
[8430216]95echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"
Note: See TracBrowser for help on using the repository browser.