-
Notifications
You must be signed in to change notification settings - Fork 10
/
make_release
executable file
·70 lines (55 loc) · 1.64 KB
/
make_release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /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
msw=survex-microsoft-windows-$VERSION.exe
echo "Download CI built microsoft-windows-installer.zip and unzip"
echo "putting $msw into `pwd`"
while test ! -f "$msw" ; do sleep 1 ; done
FILES="survex-$VERSION.tar.gz $msw"
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"