Use enum value for monitor in MoveToCenter
[dana/openbox.git] / release / go
1 #!/bin/sh
2
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
11 }
12
13 REV="$1"
14 test -z "$REV" && help
15 VERSION="$2"
16 test -z "$VERSION" && help
17 LAST="$3"
18
19 . release/common
20
21 #### CONFIRM SHORTLOG #####
22
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"
30
31 #### TEST english po VERSIONS ####
32
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"
35
36 #### TEST COMPILATION ####
37
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
45
46 # check that it builds with each optional featureset
47 ./bootstrap >/dev/null || "bootstrap failed"
48
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"
59
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"
66
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"
73
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"
80
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"
87
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"
94
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"
99
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"
104
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"
109
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"
114
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"
121
122 # VERIFY TARBALL
123
124 TAR="openbox-$VERSION.tar.gz"
125 ASC="openbox-$VERSION.tar.gz.asc"
126
127 echo Found Openbox release tarball:
128 ls -d openbox-*.tar.gz
129 test -e "$TAR" || \
130   error "Specified version does not match configure.am"
131
132 # SIGN THE TARBALL
133
134 echo Signing the release tarball:
135 gpg --sign --detach-sign --armor "$TAR"
136 test $? = 0 || \
137   error "Failed to sign release tarball"
138
139 echo Tagging the release:
140 git tag -s -m "tagging the $VERSION release" "release-$VERSION" $REV || \
141   error "Failed to tag the release"
142
143 mv "$TAR" "$ASC" "$SRCDIR"
144
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"
163
164 clean
165 exit 0