allow group without checkbox
[phpmyadmin/last10db.git] / scripts / create-release.sh
blob37cfcf1a852927828a92f813d0a4f4a6701748b2
1 #!/bin/sh
3 # $Id$
5 # 2005-09-13, lem9@users.sourceforge.net
6 # - no longer create a config.default.php from config.inc.php
8 # 2005-06-12, lem9@users.sourceforge.net
9 # - cvs server name changed to cvs, because cvs1 no longer works from
10 # shell.sourceforge.net
12 # 2003-08-23, nijel@users.sourceforge.net:
13 # - support for creating snapshots outside sourceforge:
14 # * cvs server name can be read from environment variable cvsserver
15 # * do not change to directories as used on sourceforge if $2 is local
17 # 2003-08-13, nijel@users.sourceforge.net:
18 # - config.default -> config.default.php
20 # 2004-08-09, lem9@users.sourceforge.net:
21 # - remember to create a new bug tracking group
23 # 2004-06-07 rabus@users.sourceforge.net
24 # - create backup config file
26 # 2004-04-29, lem9@users.sourceforge.net:
27 # - keep only the previous cvs directory created
29 # 2004-04-16, lem9@users.sourceforge.net:
30 # - daily snapshot when called with first parameter "snapshot"
31 # - remove directory used for the checkout
33 # 2003-11-18, nijel@users.sourceforge.net:
34 # - switch php3 -> php
36 # 2003-10-10, nijel@users.sourceforge.net:
37 # - cvsserver set on just one place to ease testing
38 # - echoes md5 sums to include on download page
40 # 2003-06-22, robbat2@users.sourceforge.net:
41 # - Moved to using updatedocs.sh for updating documentation
42 # - Make tarring faster by re-arranging ops
44 # 2003-01-17, rabus@users.sourceforge.net:
45 # - Changed the CVS hostname to cvs1 because cvs1.sourceforge.net is now blocked
46 # for the SF shell servers, too. Note: The script now works on the SF shell
47 # servers ONLY!
49 # 2002-11-22, rabus@users.sourceforge.net:
50 # - changed the CVS server dns to cvs1.sourceforge.net
51 # (cvs.phpmyadmin.sourceforge.net does not work at the SF shell anymore).
53 # 2002-10-03, rabus@users.sourceforge.net:
54 # - more detailed instructions
56 # 2002-09-08, robbat2@users.sourceforge.net:
57 # - Tweaked final instruction list
59 # 2002-06-17, lem9@users.sourceforge.net:
60 # - I option to tar for bzip2 is deprecated, use j
62 # 2002-27-04, loic@phpmyadmin.net:
63 # - added the cvs branch feature
65 # 2001-08-08, swix@users.sourceforge.net:
66 # - created script
67 # - added release todo list
70 cvsserver=${cvsserver:-cvs}
72 if [ $# = 0 ]
73 then
74 echo "Usage: create-release.sh version from_branch"
75 echo " (no spaces allowed!)"
76 echo ""
77 echo "Example: create-release.sh 2.2.7-rc1 v2_2_7-branch"
78 exit 65
81 if [ "$1" = "snapshot" ]
82 then
83 branch=''
84 elif [ "$#" = 2 ]
85 then
86 branch="-r $2"
89 if [ $1 = "snapshot" ]
90 then
91 mode="snapshot"
92 date_snapshot=`date +%Y%m%d-%H%M%S`
95 # Set target name
96 if [ "$mode" != "snapshot" ]
97 then
98 target=$1
99 else
100 target=$date_snapshot
104 if [ "$mode" != "snapshot" ]
105 then
107 cat <<END
109 Please ensure you have:
110 1. incremented rc count or version in CVS :
111 - in libraries/Config.class.php PMA_Config::__constructor() the line
112 " $this->set( 'PMA_VERSION', '2.7.1-dev' ); "
113 - in Documentation.html the 2 lines
114 " <title>phpMyAdmin $1 - Documentation</title> "
115 " <h1>phpMyAdmin $1 Documentation</h1> "
116 - in translators.html
117 - in README
118 2. synchronized the language files:
119 cd lang
120 ./sync_lang.sh
121 and checked all language files are valid (use
122 the "./scripts/check_lang.php" script to do it).
124 Continue (y/n)?
126 printf "\a"
127 read do_release
129 if [ "$do_release" != 'y' ]; then
130 exit
134 if [ "$mode" = "snapshot" -a "$2" != "local" ] ; then
135 # Goto project dir
136 cd /home/groups/p/ph/phpmyadmin/htdocs
138 ## Move old cvs dir
139 #if [ -e cvs ];
140 #then
141 # mv cvs cvs-`date +%s`
144 # Keep one previous version of the cvs directory
145 if [ -e cvs-prev ];
146 then
147 rm -rf cvs-prev
149 mv cvs cvs-prev
152 # Do CVS checkout
153 mkdir cvs
154 cd cvs
156 if [ "$mode" != "snapshot" ]
157 then
158 echo "Press [ENTER]!"
159 cvs -q -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin login
160 if [ $? -ne 0 ] ; then
161 echo "CVS login failed, bailing out"
162 exit 1
166 cvs -q -z3 -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin co -P $branch phpMyAdmin
168 if [ $? -ne 0 ] ; then
169 echo "CVS checkout failed, bailing out"
170 exit 2
173 # Cleanup release dir
174 LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-${target}
176 # Olivier asked to keep those in the cvs release, to allow testers to use
177 # cvs update on it
178 if [ "$mode" != "snapshot" ]
179 then
180 find phpMyAdmin \( -name .cvsignore -o -name CVS \) -print0 | xargs -0 rm -rf
183 find phpMyAdmin -type d -print0 | xargs -0 chmod 755
184 find phpMyAdmin -type f -print0 | xargs -0 chmod 644
185 find phpMyAdmin \( -name '*.sh' -o -name '*.pl' \) -print0 | xargs -0 chmod 755
187 # Building Documentation.txt
188 LC_ALL=C w3m -dump phpMyAdmin/Documentation.html > phpMyAdmin/Documentation.txt
190 # Renaming directory
191 mv phpMyAdmin phpMyAdmin-$target
193 # Building distribution kits
194 zip -9 -r phpMyAdmin-${target}.zip phpMyAdmin-${target}
195 tar cvf phpMyAdmin-${target}.tar phpMyAdmin-${target}
196 bzip2 -9kv phpMyAdmin-${target}.tar
197 gzip -9v phpMyAdmin-${target}.tar
199 # Cleanup
200 rm -rf phpMyAdmin-${target}
202 if [ "$mode" != "snapshot" ]
203 then
206 echo ""
207 echo ""
208 echo ""
209 echo "Files:"
210 echo "------"
212 ls -la *.gz *.zip *.bz2
214 echo
215 echo "MD5 sums:"
216 echo "--------"
218 md5sum *.{gz,zip,bz2} | sed "s/\([^ ]*\)[ ]*\([^ ]*\)/\$md5sum['\2'] = '\1';/"
220 echo
221 echo "Sizes:"
222 echo "------"
224 ls -l --block-size=k *.{gz,zip,bz2} | sed -r "s/[a-z-]+[[:space:]]+[0-9]+[[:space:]]+[^[:space:]]+[[:space:]]+[^[:space:]]+[[:space:]]+([0-9]*)K.*[[:space:]]([^[:space:]]+)\$/\$size['\2'] = \1;/"
226 echo
227 echo "Add these to /home/groups/p/ph/phpmyadmin/htdocs/home_page/files.inc.php on sf"
229 cat <<END
232 Todo now:
233 ---------
234 1. tag the cvs tree with the new revision number for a plain release or a
235 release candidate:
236 version 2.7.0 gets two tags: RELEASE_2_7_0 and STABLE
237 version 2.7.1-rc1 gets RELEASE_2_7_1RC1 and TESTING
239 2. upload the files to SF:
240 ftp upload.sourceforge.net
241 cd incoming
242 binary
243 mput cvs/*.gz *.zip *.bz2
244 3. add files to SF files page (cut and paste changelog since last release)
245 4. add SF news item to phpMyAdmin project
246 5. update web page:
247 - add MD5s and file sizes to /home/groups/p/ph/phpmyadmin/htdocs/home_page/includes/list_files.inc.php
248 - add release to /home/groups/p/ph/phpmyadmin/htdocs/home_page/includes/list_release.inc.php
249 6. announce release on freshmeat (http://freshmeat.net/projects/phpmyadmin/)
250 7. send a short mail (with list of major changes) to
251 phpmyadmin-devel@lists.sourceforge.net
252 phpmyadmin-news@lists.sourceforge.net
253 phpmyadmin-users@lists.sourceforge.net
255 Don't forget to update the Description section in the announcement,
256 based on Documentation.html.
258 8. increment rc count or version in CVS :
259 - in libraries/Config.class.php PMA_Config::__constructor() the line
260 " $this->set( 'PMA_VERSION', '2.7.1-dev' ); "
261 - in Documentation.html the 2 lines
262 " <title>phpMyAdmin 2.2.2-rc1 - Documentation</title> "
263 " <h1>phpMyAdmin 2.2.2-rc1 Documentation</h1> "
264 - in translators.html
266 9. add a group for bug tracking this new version, at
267 https://sourceforge.net/tracker/admin/index.php?group_id=23067&atid=377408&add_group=1
269 10. Visit http://phpmyadmin.net/home_page/version.php then copy the results to /home/groups/p/ph/phpmyadmin/htdocs/latest.txt. This is needed for users of the pre-2.8.0 scripts/upgrade.pl.
271 11. the end :-)
277 if [ "$mode" = "snapshot" -a "$2" != "local" ] ; then
278 cd ..
279 find cvs -type d -print0 | xargs -0 chmod 775
280 find cvs -type f -print0 | xargs -0 chmod 664
283 # Removed due to not needed thanks to clever scripting by Robbat2
284 # 9. update the demo subdirectory:
285 # - in htdocs, cvs update phpMyAdmin
286 # - and don't forget to give write rights for the updated scripts to the
287 # whole group