forked from Quagga/quagga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·93 lines (58 loc) · 2.17 KB
/
release.sh
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
if [ $# -ne 2 ] ; then
echo "usage: $0 <quagga-release-tag> <quagga-previous-release-tag>"
exit
fi
errmsg () {
echo "Error occurred. To rerun you may first need to delete the tag".
exit 1
}
trap errmsg ERR
REL=${1:?Release version must be given as first argument!}
PREV=${2:?Previous release version must be given as second argument!}
TMPDIR=`mktemp -d /tmp/quagga-rel-XXXXXXXXX`
if [ ! -d $TMPDIR ] ; then
echo "Problem making temp directory ${TMPDIR}!"
exit 1;
fi
echo "Tagging branch head as release ${REL}"
git tag -u 0x6FE57CA8C1A4AEA6 -m "Quagga release $REL" ${REL}
mkdir -p ${TMPDIR}/a || exit 1
mkdir -p ${TMPDIR}/verify || exit 1
echo "Making git archive"
( git archive ${REL} | tar xC ${TMPDIR}/a ) || exit 1
git log ${PREV}..${REL} > ${TMPDIR}/a/${REL}.changelog.txt || exit 1
git log --pretty=%s ${PREV}..${REL} > ${TMPDIR}/a/${REL}.subjects.txt || exit 1
cd ${TMPDIR}/a || exit 1
echo "Doing test build of archive file and making dist tarball"
(autoreconf -i && ./configure && make -j && make dist-gzip) || exit 1
echo "Verifying dist tarball"
cp ${REL}.tar.gz ${TMPDIR}/verify || exit 1
cd ${TMPDIR}/verify || exit 1
tar -zxf ${REL}.tar.gz || exit 1
cd ${REL} || exit 1
autoreconf -i && ./configure && make -j
cd ${TMPDIR}/a || exit 1
gpg -u 0x6FE57CA8C1A4AEA6 -a --detach-sign ${REL}.tar.gz
cat <<- EOF
Release tagged as: ${REL}
Release files are in ${TMPDIR}/a:
${TMPDIR}/a/${REL}.tar.gz
${TMPDIR}/a/${REL}.tar.gz.asc
${TMPDIR}/a/${REL}.changelog.txt
If you need to redo the release, you must delete the tag first:
git tag -d ${REL}
To finish the release:
* push the tag to savannah:
git push <savannah remote name> tag ${REL}
* Upload the 3 files to the savannah releases area:
scp ${TMPDIR}/a/${REL}.tar.gz \
${TMPDIR}/a/${REL}.tar.gz.asc \
${TMPDIR}/a/${REL}.changelog.txt
<username>@dl.sv.nongnu.org:/releases/quagga
* Update the version list in bugzilla:
https://bugzilla.quagga.net/editversions.cgi?action=add&product=Quagga
* Add a news entry to the Savannah front page. The short list of commit
subjects (${TMPDIR}/a/${REL}.subjects.txt) may be useful here.
* Email the quagga-dev and quagga-users lists
EOF