-
Notifications
You must be signed in to change notification settings - Fork 14
/
release.sh
executable file
·126 lines (120 loc) · 1.87 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/sh
#
# release.sh: script to roll a release tarball of darkstat.
# copyright (c) 2006-2016 Emil Mikulic.
#
# This is for developer use only and lives in the repo but
# shouldn't end up in a tarball.
#
# Release checklist:
# - git tag 3.0.xxx
# - git push --tags
# - Update website
# - Mail announcement to darkstat-announce@googlegroups.com
# - Update FreeBSD port, e.g.:
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200425
#
if [ $# -ne 1 ]; then
echo "usage: $0 3.0.0rc0" >&2
exit 1
fi
NAME=darkstat
VERSION="$1"
files="\
AUTHORS \
ChangeLog \
COPYING.GPL \
INSTALL \
LICENSE \
Makefile.in \
NEWS \
README.md \
acct.c \
acct.h \
addr.c \
addr.h \
bsd.c \
bsd.h \
cap.c \
cap.h \
cdefs.h \
contrib \
conv.c \
conv.h \
darkstat.8.in \
darkstat.c \
daylog.c \
daylog.h \
db.c \
db.h \
decode.c \
decode.h \
dns.c \
dns.h \
err.c \
err.h \
export-format.txt \
favicon.h \
graph_db.c \
graph_db.h \
graphjs.h \
hosts_db.c \
hosts_db.h \
hosts_sort.c \
html.c \
html.h \
http.c \
http.h \
install-sh \
localip.c \
localip.h \
ncache.c \
ncache.h \
now.c \
now.h \
opt.h \
pidfile.c \
pidfile.h \
queue.h \
static \
str.c \
str.h \
stylecss.h \
tree.h \
"
# end packing list
say() {
echo ==\> "$@" >&2
}
run() {
say "$@"
"$@" || { say ERROR!; exit 1; }
}
PKG=$NAME-$VERSION
say releasing $PKG
run make depend
run make graphjs.h stylecss.h
run autoconf
run autoheader
run ./config.status
run ./test_headers.sh
if git status --porcelain | egrep -v '^\?\?' -q; then
say ERROR: uncommitted changes:
git status
exit 1
fi
run mkdir $PKG
run cp -r $files $PKG/.
run sed -e "/AC_INIT/s/3.0.0-git/$VERSION/" configure.ac > $PKG/configure.ac
say version set to: $(grep '^AC_INIT' $PKG/configure.ac)
(cd $PKG
run autoconf
run autoheader
run rm -r autom4te.cache
) || exit 1
# package it up
run tar chof $PKG.tar $PKG
run bzip2 -9vv $PKG.tar
say output:
ls -l $PKG.tar.bz2
say FINISHED!