We use congfigure.ac not configure.am
[openbox.git] / release / go
bloba47a0f03f6793df65aa4af2aa9602d6c5098b2a6
1 #!/bin/sh
3 help() {
4 echo "Usage: $0 <revision> <version> [lastrelease]"
5 echo
6 echo " <revision> The revision which should be used for release."
7 echo " <version> The version of the release."
8 echo " [lastrelease] The revision of the most recent release made."
9 echo " By default it uses the most recent release-tag."
10 exit 1
13 REV="$1"
14 test -z "$REV" && help
15 VERSION="$2"
16 test -z "$VERSION" && help
17 LAST="$3"
19 . release/common
21 #### CONFIRM SHORTLOG #####
23 echo Shortlog from previous release:
24 echo "$SHORTLOG"
25 echo
26 echo Shortlog from $LAST contains $(echo "$SHORTLOG"|wc -l) lines
27 echo -n "ok? (y/n) "
28 read a
29 test "$a" = "y" || error "aborted"
31 #### TEST english po VERSIONS ####
33 BAD_PO="$(grep Project-Id-Version po/en*.po|grep -v "openbox $VERSION\\\\n")"
34 test -z "$BAD_PO" || error "wrong version in po files" "$BAD_PO"
36 #### TEST COMPILATION ####
38 # check that it builds
39 ./bootstrap >/dev/null || "bootstrap failed"
40 #CFLAGS="-Werror -isystem /usr/lib/glib-2.0" \
41 ./configure -C --enable-debug >/dev/null || \
42 error "configure (with debug) failed"
43 make || error "make (with debug and Werror) failed"
44 git clean -f -x -d -q
46 # check that it builds with each optional featureset
47 ./bootstrap >/dev/null || "bootstrap failed"
49 echo Check compile with all options enabled
50 ./configure -C >/dev/null || \
51 error "configure failed"
52 make >/dev/null 2>/dev/null || \
53 error "make failed"
54 grep "XKB 1" config.log >/dev/null || error "missing xkb extension"
55 grep "XRANDR 1" config.log >/dev/null || error "missing xrandr extension"
56 grep "XINERAMA 1" config.log >/dev/null || error "missing xinerama extension"
57 grep "SYNC 1" config.log >/dev/null || error "missing sync extension"
58 make clean >/dev/null || error "make clean failed"
60 echo Check compile with startup notification disabled
61 ./configure -C --disable-startup-notification >/dev/null || \
62 error "configure failed"
63 make >/dev/null 2>/dev/null || \
64 error "make (with --disable-startup-notification) failed"
65 make clean >/dev/null || error "make clean failed"
67 echo Check compile with xcursor disabled
68 ./configure -C --disable-xcursor >/dev/null || \
69 error "configure failed"
70 make >/dev/null 2>/dev/null || \
71 error "make (with --disable-xcursor) failed"
72 make clean >/dev/null || error "make clean failed"
74 echo Check compile with imlib2 disabled
75 ./configure -C --disable-imlib2 >/dev/null || \
76 error "configure failed"
77 make >/dev/null 2>/dev/null || \
78 error "make (with --disable-imlib2) failed"
79 make clean >/dev/null || error "make clean failed"
81 echo Check compile with librsvg disabled
82 ./configure -C --disable-imlib2 >/dev/null || \
83 error "configure failed"
84 make >/dev/null 2>/dev/null || \
85 error "make (with --disable-librsvg) failed"
86 make clean >/dev/null || error "make clean failed"
88 echo Check compile with session management disabled
89 ./configure -C --disable-session-management >/dev/null || \
90 error "configure failed"
91 make >/dev/null 2>/dev/null || \
92 error "make (with --disable-session-management) failed"
93 make clean >/dev/null || error "make clean failed"
95 echo Check compile with xkb disabled
96 ./configure -C --disable-xkb >/dev/null || error "configure failed"
97 make >/dev/null 2>/dev/null || error "make (with --disable-xkb) failed"
98 make clean >/dev/null || error "make clean failed"
100 echo Check compile with xrandr disabled
101 ./configure -C --disable-xrandr >/dev/null || error "configure failed"
102 make >/dev/null 2>/dev/null || error "make (with --disable-xrandr) failed"
103 make clean >/dev/null || error "make clean failed"
105 echo Check compile with xinerama disabled
106 ./configure -C --disable-xinerama >/dev/null || error "configure failed"
107 make >/dev/null 2>/dev/null || error "make (with --disable-xinerama) failed"
108 make clean >/dev/null || error "make clean failed"
110 echo Check compile with xsync disabled
111 ./configure -C --disable-xsync >/dev/null || error "configure failed"
112 make >/dev/null 2>/dev/null || error "make (with --disable-xsync) failed"
113 make clean >/dev/null || error "make clean failed"
115 # check that it installs sanely
116 echo Check installation correctness
117 ./configure -C >/dev/null || \
118 error "configure failed"
119 make distcheck >/dev/null || \
120 error "make distcheck failed"
122 # VERIFY TARBALL
124 TAR="openbox-$VERSION.tar.gz"
125 ASC="openbox-$VERSION.tar.gz.asc"
127 echo Found Openbox release tarball:
128 ls -d openbox-*.tar.gz
129 test -e "$TAR" || \
130 error "Specified version does not match configure.ac"
132 # SIGN THE TARBALL
134 echo Signing the release tarball:
135 gpg --sign --detach-sign --armor "$TAR"
136 test $? = 0 || \
137 error "Failed to sign release tarball"
139 echo Tagging the release:
140 git tag -s -m "tagging the $VERSION release" "release-$VERSION" $REV || \
141 error "Failed to tag the release"
143 mv "$TAR" "$ASC" "$SRCDIR"
145 echo "=$VERSION="
146 echo "$CLNOWRAP"
147 echo
148 echo
149 echo Edit download page:
150 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Download&action=edit&section=1"
151 echo
152 echo Edit changelog:
153 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Changelog&action=edit&section=1"
154 echo
155 echo Push the tag:
156 echo " git push origin tag release-$VERSION"
157 echo
158 echo Email:
159 echo " ./release/email $*"
160 echo
161 cd "$SRCDIR"
162 ls -l "$TAR" "$ASC"
164 clean
165 exit 0