4 echo "Usage: $0 <revision> <version> [lastrelease]"
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."
15 make >/dev/null 2>/dev/null || error "make failed ($style)"
16 ./obt/obt_unittests > /dev/null || error "unittest failed ($style)"
17 make distclean >/dev/null || error "make distclean failed"
21 test -z "$REV" && help
23 test -z "$VERSION" && help
28 #### CONFIRM SHORTLOG #####
30 echo Shortlog from previous release:
33 echo Shortlog from $LAST contains $(echo "$SHORTLOG"|wc -l) lines
36 test "$a" = "y" || error "aborted"
38 #### TEST english po VERSIONS ####
40 BAD_PO="$(grep Project-Id-Version po/en*.po|grep -v "openbox $VERSION\\\\n")"
41 test -z "$BAD_PO" || error "wrong version in po files" "$BAD_PO"
43 #### RESET THE REPO TO A CLEAN STATE ####
47 #### TEST ALL OPTIONAL COMPILATION FLAGS ####
49 # check that it builds
51 ./bootstrap >/dev/null 2>/dev/null || "bootstrap failed"
53 echo Check compile with debug and all options enabled
54 CFLAGS="-Werror -isystem /usr/lib/glib-2.0" \
55 ./configure -C --enable-debug >/dev/null || \
56 error "configure (with debug) failed"
57 build_and_test "with debug and Werror"
59 # check that it builds with each optional featureset
60 echo Check compile with all options enabled
61 ./configure -C >/dev/null || \
62 error "configure failed"
63 grep "XKB 1" config.log >/dev/null || error "missing xkb extension"
64 grep "XRANDR 1" config.log >/dev/null || error "missing xrandr extension"
65 grep "XINERAMA 1" config.log >/dev/null || error "missing xinerama extension"
66 grep "SYNC 1" config.log >/dev/null || error "missing sync extension"
67 grep "USE_XCURSOR 1" config.log >/dev/null || error "missing xcursor extension"
68 grep "USE_IMLIB2 1" config.log >/dev/null || error "missing imlib2 library"
69 grep "USE_LIBRSVG 1" config.log >/dev/null || error "missing librsvg library"
70 grep "USE_SM 1" config.log >/dev/null || error "missing session management extension"
73 echo Check compile with startup notification disabled
74 ./configure -C --disable-startup-notification >/dev/null || \
75 error "configure failed"
76 build_and_test "with --disable-startup-notification"
78 echo Check compile with xcursor disabled
79 ./configure -C --disable-xcursor >/dev/null || \
80 error "configure failed"
81 build_and_test "with --disable-xcursor"
83 echo Check compile with imlib2 disabled
84 ./configure -C --disable-imlib2 >/dev/null || \
85 error "configure failed"
86 build_and_test "with --disable-imlib2"
88 echo Check compile with librsvg disabled
89 ./configure -C --disable-librsvg >/dev/null || \
90 error "configure failed"
91 build_and_test "with --disable-librsvg"
93 echo Check compile with session management disabled
94 ./configure -C --disable-session-management >/dev/null || \
95 error "configure failed"
96 build_and_test "with --disable-session-management"
98 echo Check compile with xkb disabled
99 ./configure -C --disable-xkb >/dev/null || error "configure failed"
100 build_and_test "with --disable-xkb"
102 echo Check compile with xrandr disabled
103 ./configure -C --disable-xrandr >/dev/null || error "configure failed"
104 build_and_test "with --disable-xrandr"
106 echo Check compile with xinerama disabled
107 ./configure -C --disable-xinerama >/dev/null || error "configure failed"
108 build_and_test("with --disable-xinerama")
110 echo Check compile with xsync disabled
111 ./configure -C --disable-xsync >/dev/null || error "configure failed"
112 build_and_test("with --disable-xsync")
114 # check that it installs sanely
115 echo Check installation correctness
116 ./configure -C >/dev/null || \
117 error "configure failed"
118 make distcheck >/dev/null || \
119 error "make distcheck failed"
123 TAR="openbox-$VERSION.tar.gz"
124 ASC="openbox-$VERSION.tar.gz.asc"
126 echo Found Openbox release tarball:
127 ls -d openbox-*.tar.gz
129 error "Specified version does not match configure.ac"
133 echo Signing the release tarball:
134 gpg --sign --detach-sign --armor "$TAR"
136 error "Failed to sign release tarball"
138 echo Tagging the release:
139 git tag -s -m "tagging the $VERSION release" "release-$VERSION" $REV || \
140 error "Failed to tag the release"
142 mv "$TAR" "$ASC" "$SRCDIR"
148 echo Edit download page:
149 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Download&action=edit§ion=1"
152 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Changelog&action=edit§ion=1"
154 echo Add the version to the bug tracker:
155 echo " https://bugzilla.icculus.org/editversions.cgi?action=add&product=Openbox"
158 echo " git push origin tag release-$VERSION"
161 echo " ./release/email $*"
163 echo Update IRC topic and have a beer/juice!