blob: d57ea981b5f0c9a5202f48de03e017b2112941b7 [file] [log] [blame]
Paul Jakmaa04d8362017-01-27 11:37:36 +00001#!/bin/bash
2
3if [ $# -ne 2 ] ; then
4 echo "usage: $0 <quagga-release-tag> <quagga-previous-release-tag>"
5 exit
6fi
7
8errmsg () {
9 echo "Error occurred. To rerun you may first need to delete the tag".
10 exit 1
11}
12
13trap errmsg ERR
14
15REL=${1:?Release version must be given as first argument!}
16PREV=${2:?Previous release version must be given as second argument!}
17
18TMPDIR=`mktemp -d /tmp/quagga-rel-XXXXXXXXX`
19
20if [ ! -d $TMPDIR ] ; then
21 echo "Problem making temp directory ${TMPDIR}!"
22 exit 1;
23fi
24
25echo "Tagging branch head as release ${REL}"
26
27git tag -u 0x6FE57CA8C1A4AEA6 -m "Quagga release $REL" ${REL}
28
29mkdir -p ${TMPDIR}/a || exit 1
30mkdir -p ${TMPDIR}/verify || exit 1
31
32echo "Making git archive"
33
34( git archive ${REL} | tar xC ${TMPDIR}/a ) || exit 1
35
36git log ${PREV}..${REL} > ${TMPDIR}/a/${REL}.changelog.txt || exit 1
37git log --pretty=%s ${PREV}..${REL} > ${TMPDIR}/a/${REL}.subjects.txt || exit 1
38
39cd ${TMPDIR}/a || exit 1
40
41echo "Doing test build of archive file and making dist tarball"
42
43(autoreconf -i && ./configure && make -j && make dist-gzip) || exit 1
44
45echo "Verifying dist tarball"
46
47cp ${REL}.tar.gz ${TMPDIR}/verify || exit 1
48
49cd ${TMPDIR}/verify || exit 1
50tar -zxf ${REL}.tar.gz || exit 1
51cd ${REL} || exit 1
52autoreconf -i && ./configure && make -j
53
54cd ${TMPDIR}/a || exit 1
55gpg -u 0x6FE57CA8C1A4AEA6 -a --detach-sign ${REL}.tar.gz
56
57cat <<- EOF
58
59Release tagged as: ${REL}
60
61Release files are in ${TMPDIR}/a:
62
63 ${TMPDIR}/a/${REL}.tar.gz
64 ${TMPDIR}/a/${REL}.tar.gz.asc
65 ${TMPDIR}/a/${REL}.changelog.txt
66
67If you need to redo the release, you must delete the tag first:
68
69 git tag -d ${REL}
70
71To finish the release:
72
73* push the tag to savannah:
74
75 git push <savannah remote name> tag ${REL}
76
77* Upload the 3 files to the savannah releases area:
78
79 scp ${TMPDIR}/a/${REL}.tar.gz \
80 ${TMPDIR}/a/${REL}.tar.gz.asc \
81 ${TMPDIR}/a/${REL}.changelog.txt
82 <username>@dl.sv.nongnu.org:/releases/quagga
83
84* Update the version list in bugzilla:
85
86 https://bugzilla.quagga.net/editversions.cgi?action=add&product=Quagga
87
88* Add a news entry to the Savannah front page. The short list of commit
89 subjects (${TMPDIR}/a/${REL}.subjects.txt) may be useful here.
90
91* Email the quagga-dev and quagga-users lists
92
93EOF