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 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"
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
130 error
"Specified version does not match configure.ac"
134 echo Signing the release tarball
:
135 gpg
--sign --detach-sign --armor "$TAR"
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"
149 echo Edit download page
:
150 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Download&action=edit§ion=1"
153 echo " http://openbox.org/oldwiki/index.php?title=Openbox:Changelog&action=edit§ion=1"
156 echo " git push origin tag release-$VERSION"
159 echo " ./release/email $*"