Serve favicon over http.
[darkstat] / release.sh
1 #!/bin/sh
2 #
3 # release.sh: script to roll a release tarball of darkstat.
4 # copyright (c) 2006-2016 Emil Mikulic.
5 #
6 # This is for developer use only and lives in the repo but
7 # shouldn't end up in a tarball.
8 #
9 # Release checklist:
10 # - git tag 3.0.xxx
11 # - git push --tags
12 # - Update website
13 # - Mail announcement to darkstat-announce@googlegroups.com
14 # - Update FreeBSD port, e.g.:
15 # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200425
16 #
17 if [ $# -ne 1 ]; then
18 echo "usage: $0 3.0.0rc0" >&2
19 exit 1
20 fi
21
22 NAME=darkstat
23 VERSION="$1"
24
25 files="\
26 AUTHORS \
27 ChangeLog \
28 COPYING.GPL \
29 INSTALL \
30 LICENSE \
31 Makefile.in \
32 NEWS \
33 README \
34 acct.c \
35 acct.h \
36 addr.c \
37 addr.h \
38 bsd.c \
39 bsd.h \
40 cap.c \
41 cap.h \
42 cdefs.h \
43 contrib \
44 conv.c \
45 conv.h \
46 darkstat.8.in \
47 darkstat.c \
48 daylog.c \
49 daylog.h \
50 db.c \
51 db.h \
52 decode.c \
53 decode.h \
54 dns.c \
55 dns.h \
56 err.c \
57 err.h \
58 export-format.txt \
59 favicon.h \
60 graph_db.c \
61 graph_db.h \
62 graphjs.h \
63 hosts_db.c \
64 hosts_db.h \
65 hosts_sort.c \
66 html.c \
67 html.h \
68 http.c \
69 http.h \
70 install-sh \
71 localip.c \
72 localip.h \
73 ncache.c \
74 ncache.h \
75 now.c \
76 now.h \
77 opt.h \
78 pidfile.c \
79 pidfile.h \
80 queue.h \
81 static \
82 str.c \
83 str.h \
84 stylecss.h \
85 tree.h \
86 "
87 # end packing list
88
89 say() {
90 echo ==\> "$@" >&2
91 }
92
93 run() {
94 say "$@"
95 "$@" || { say ERROR!; exit 1; }
96 }
97
98 PKG=$NAME-$VERSION
99 say releasing $PKG
100 run make depend
101 run make graphjs.h stylecss.h
102 run autoconf
103 run autoheader
104 run ./config.status
105 run ./test_headers.sh
106 if git status --porcelain | egrep -v '^\?\?' -q; then
107 say ERROR: uncommitted changes:
108 git status
109 exit 1
110 fi
111 run mkdir $PKG
112 run cp -r $files $PKG/.
113 run sed -e "/AC_INIT/s/darkstat, [^,)]*/darkstat, $VERSION/" configure.ac > $PKG/configure.ac
114 say set version: `grep '^AC_INIT' $PKG/configure.ac`
115 (cd $PKG
116 run autoconf
117 run autoheader
118 run rm -r autom4te.cache
119 ) || exit 1
120
121 # package it up
122 run tar chof $PKG.tar $PKG
123 run bzip2 -9vv $PKG.tar
124 say output:
125 ls -l $PKG.tar.bz2
126 say FINISHED!