source: git/make_release @ 1b317d3

RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since 1b317d3 was 8e6b6cd, checked in by Olly Betts <olly@…>, 11 years ago

Sign the release tag

  • Property mode set to 100755
File size: 3.3 KB
Line 
1#! /bin/sh
2
3set -e
4
5rel=yes
6if test x"$1" = x-t ; then
7   rel=
8   shift
9fi
10
11if test x"$rel" = xyes ; then
12  cd src
13  perl -e 'while (<>) { if (m!(.*)//! && $1 !~ / \* /) {print "$ARGV:$.:// comment in C source\n"; exit 1}} continue { close ARGV if eof }' \
14      *.c \
15      cavern.h commands.h cmdline.h date.h datain.h debug.h\
16      filelist.h filename.h getopt.h hash.h img.c img.h img_hosted.h ini.h\
17      listpos.h matrix.h message.h namecmp.h netartic.h netbits.h\
18      netskel.h network.h osalloc.h osdepend.h ostypes.h out.h readval.h str.h\
19      useful.h validate.h whichos.h
20  cd ..
21
22  # Check there are no uncommitted changes.
23  if git commit -a --dry-run >/dev/null 2>/dev/null ; then
24    echo 'There are uncommitted changes - please rectify'
25    echo 'If you just want to test, run with option -t'
26    exit 1
27  fi
28
29  test ! -f Makefile || make distclean
30  cp -u /usr/share/misc/config.guess .
31  cp -u /usr/share/misc/config.sub .
32  mv INSTALL INSTALL.keep
33  autoreconf --force -i
34  mv INSTALL.keep INSTALL
35  ./configure CC=gcc CXX=g++
36  make CFLAGS='-Werror' CXXFLAGS='-Werror'
37  VALGRIND=valgrind make distcheck
38else
39  make dist
40fi
41
42# Perform mingw build on a clean unpacked source tree from the release tarball
43# so that (a) we don't need to "make distclean" on the source tree and (b) we
44# ensure that any files required to build the mingw version and installer
45# package are actually shipped in the source tarball.
46tarball=`ls -1t survex-1*.tar.gz|head -n1`
47tardir=`basename "$tarball" .tar.gz`
48rm -rf "$tardir"
49tar xf "$tarball"
50cd "$tardir"
51
52test -n "$build_platform" || build_platform=`sh config.guess`
53SAVE_PATH=$PATH
54for wxc in \
55  /usr/i686-w64-mingw32/lib/wx/config/i686-w64-mingw32-msw-unicode-static-3.0 \
56  /usr/i586-mingw32msvc/lib/wx/config/i586-mingw32msvc-msw-unicode-static-3.0 \
57  /usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8 \
58  /usr/lib/wx/config/i686-w64-mingw32-msw-unicode-release-static-2.8 \
59  "" ; do
60  if test -z "$wxc" ; then
61    echo "wx-config for mingw not found" >&2
62    exit 1
63  fi
64  if test -x "$wxc" ; then
65    CC=`$wxc --cc`
66    CXX=`$wxc --cxx`
67    break
68  fi
69done
70host=mingw
71case $CC in
72  *i686-w64-mingw32-gcc)
73    # debian mingw package
74    host=i686-w64-mingw32
75    ;;
76  *i586-mingw32msvc-gcc)
77    # debian mingw32 package
78    host=i586-mingw32msvc
79    ;;
80  *i386-mingw32msvc-gcc)
81    # debian mingw32 package
82    host=i386-mingw32msvc
83    ;;
84esac
85PATH=/usr/$host/bin:$PATH
86
87# Passing -Werror to configure causes AC_CHECK_FUNCS to fail, so pass it to
88# make instead.
89./configure --host="$host" --build="$build_platform" CC="$CC" CXX="$CXX" CXXFLAGS="-g -O2 -fno-strict-aliasing -Werror" WX_CONFIG="$wxc" LDFLAGS='-s -static'
90make CFLAGS='-g -O2 -Werror'
91make mingw_iss
92PATH=$SAVE_PATH
93
94mv survex-win32-*.exe ..
95cd ..
96
97if test x"$rel" = xyes ; then
98  rm -rf "$tardir"
99fi
100
101VERSION=`sed 's/^VERSION *= *//p;d' Makefile`
102FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe"
103echo "SHA1 checksums:"
104sha1sum $FILES
105echo
106
107for f in $FILES ; do
108    gpg --detach-sign --armour "$f"
109    FILES="$FILES $f.asc"
110done
111
112echo "To tag this release and upload it to the webserver, run:"
113echo git tag -s -m"'Tagging $VERSION'" "$VERSION"
114
115HOST=atreus.tartarus.org
116echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION"
117echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"
Note: See TracBrowser for help on using the repository browser.