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."
14 test -z "$REV" && help
16 test -z "$VERSION" && help
21 #### CONFIRM SHORTLOG #####
23 echo Shortlog from previous release:
26 echo Shortlog from $LAST contains $(echo "$SHORTLOG"|wc -l) lines
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"
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 || \
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 session management disabled
82 ./configure -C --disable-session-management >/dev/null || \
83 error "configure failed"
84 make >/dev/null 2>/dev/null || \
85 error "make (with --disable-session-management) failed"
86 make clean >/dev/null || error "make clean failed"
88 echo Check compile with xkb disabled
89 ./configure -C --disable-xkb >/dev/null || error "configure failed"
90 make >/dev/null 2>/dev/null || error "make (with --disable-xkb) failed"
91 make clean >/dev/null || error "make clean failed"
93 echo Check compile with xrandr disabled
94 ./configure -C --disable-xrandr >/dev/null || error "configure failed"
95 make >/dev/null 2>/dev/null || error "make (with --disable-xrandr) failed"
96 make clean >/dev/null || error "make clean failed"
98 echo Check compile with xinerama disabled
99 ./configure -C --disable-xinerama >/dev/null || error "configure failed"
100 make >/dev/null 2>/dev/null || error "make (with --disable-xinerama) failed"
101 make clean >/dev/null || error "make clean failed"
103 echo Check compile with xsync disabled
104 ./configure -C --disable-xsync >/dev/null || error "configure failed"
105 make >/dev/null 2>/dev/null || error "make (with --disable-xsync) failed"
106 make clean >/dev/null || error "make clean failed"
108 # check that it installs sanely
109 echo Check installation correctness
110 ./configure -C >/dev/null || \
111 error "configure failed"
112 make distcheck >/dev/null || \
113 error "make distcheck failed"
117 TAR="openbox-$VERSION.tar.gz"
118 ASC="openbox-$VERSION.tar.gz.asc"
120 echo Found Openbox release tarball:
121 ls -d openbox-*.tar.gz
123 error "Specified version does not match configure.am"
127 echo Signing the release tarball:
128 gpg --sign --detach-sign --armor "$TAR"
130 error "Failed to sign release tarball"
132 echo Tagging the release:
133 git tag -s -m "tagging the $VERSION release" "release-$VERSION" $REV || \
134 error "Failed to tag the release"
136 mv "$TAR" "$ASC" "$SRCDIR"
142 echo Edit download page:
143 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Download&action=edit§ion=1"
146 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Changelog&action=edit§ion=1"
149 echo " git push origin tag release-$VERSION"
152 echo " ./release/email $*"