Tracking report should obey MaxCharactersInDisplayedSQL
[phpmyadmin/madhuracj.git] / scripts / create-release.sh
blob2c42b95538e1ce734e656b34f2b6df1f40eb7684
1 #!/bin/sh
3 # $Id$
4 # vim: expandtab sw=4 ts=4 sts=4:
7 KITS="all-languages english"
8 COMPRESSIONS="zip-7z tbz tgz 7z"
10 if [ $# = 0 ]
11 then
12 echo "Usages:"
13 echo " create-release.sh <version> [from_branch]"
14 echo " create-release.sh snapshot [sf]"
15 echo " (no spaces allowed!)"
16 echo ""
17 echo "Examples:"
18 echo " create-release.sh 2.9.0-rc1 branches/QA_2_9"
19 echo " create-release.sh 2.9.0 tags/RELEASE_2_9_0"
20 exit 65
23 branch='trunk'
25 if [ "$1" = "snapshot" ] ; then
26 mode="snapshot"
27 date_snapshot=`date +%Y%m%d-%H%M%S`
28 target=$date_snapshot
29 else
30 if [ "$#" -ge 2 ] ; then
31 branch="$2"
33 target="$1"
34 cat <<END
36 Please ensure you have:
37 1. incremented rc count or version in subversion :
38 - in libraries/Config.class.php PMA_Config::__constructor() the line
39 " \$this->set( 'PMA_VERSION', '$1' ); "
40 - in Documentation.html the 2 lines
41 " <title>phpMyAdmin $1 - Documentation</title> "
42 " <h1>phpMyAdmin $1 Documentation</h1> "
43 - in translators.html
44 - in README
45 2. checked that all language files are valid (use
46 the "./scripts/check_lang.php" script to do it).
48 Continue (y/n)?
49 END
50 read do_release
52 if [ "$do_release" != 'y' ]; then
53 exit
57 if [ "$mode" = "snapshot" -a "$2" = "sf" ] ; then
58 # Goto project dir
59 cd /home/groups/p/ph/phpmyadmin/htdocs
61 # Keep one previous version of the cvs directory
62 if [ -e svn-prev ] ; then
63 rm -rf svn-prev
65 mv svn svn-prev
68 # Do SVNcheckout
69 mkdir -p ./svn
70 cd svn
72 echo "Exporting repository from subversion"
74 svn export -q https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/$branch/phpMyAdmin
76 if [ $? -ne 0 ] ; then
77 echo "Subversion checkout failed, bailing out"
78 exit 2
81 # Cleanup release dir
82 LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-${target}
84 # Building Documentation.txt
85 LC_ALL=C w3m -dump phpMyAdmin/Documentation.html > phpMyAdmin/Documentation.txt
87 # Remove test directory from package to avoid Path disclosure messages
88 # if someone runs /test/wui.php and there are test failures
89 rm -rf phpMyAdmin/test
91 # Renaming directory
92 mv phpMyAdmin phpMyAdmin-$target
94 # Prepare all kits
95 for kit in $KITS ; do
96 # Copy all files
97 name=phpMyAdmin-$target-$kit
98 cp -r phpMyAdmin-$target $name
100 # Cleanup translations
101 cd phpMyAdmin-$target-$kit
102 scripts/lang-cleanup.sh $kit
103 cd ..
105 # Prepare distributions
106 for comp in $COMPRESSIONS ; do
107 case $comp in
108 tbz|tgz)
109 echo "Creating $name.tar"
110 tar cf $name.tar $name
111 if [ $comp = tbz ] ; then
112 echo "Creating $name.tar.bz2"
113 bzip2 -9k $name.tar
115 if [ $comp = tgz ] ; then
116 echo "Creating $name.tar.gz"
117 gzip -9c $name.tar > $name.tar.gz
119 rm $name.tar
121 zip)
122 echo "Creating $name.zip"
123 zip -q -9 -r $name.zip $name
125 zip-7z)
126 echo "Creating $name.zip"
127 7za a -bd -tzip $name.zip $name > /dev/null
130 echo "Creating $name.7z"
131 7za a -bd $name.7z $name > /dev/null
134 echo "WARNING: ignoring compression '$comp', not known!"
136 esac
137 done
139 # Remove directory with current dist set
140 rm -rf $name
141 done
143 # Cleanup
144 rm -rf phpMyAdmin-${target}
146 if [ "$mode" != "snapshot" ]
147 then
150 echo ""
151 echo ""
152 echo ""
153 echo "Files:"
154 echo "------"
156 ls -la *.gz *.zip *.bz2 *.7z
158 cat <<END
161 Todo now:
162 ---------
163 1. tag the subversion tree with the new revision number for a plain release
164 or a release candidate:
165 version 2.7.0 gets two tags: RELEASE_2_7_0 and STABLE
166 version 2.7.1-rc1 gets RELEASE_2_7_1RC1 and TESTING
168 2. prepare a phpMyAdmin-xxx-notes.html explaining in short the goal of
169 this release and paste into it the ChangeLog for this release
170 3. upload the files and the notes file to SF (procedure explained on the sf.net Project Admin/File Manager help page)
171 4. add SF news item to phpMyAdmin project
172 5. announce release on freshmeat (http://freshmeat.net/projects/phpmyadmin/)
173 6. send a short mail (with list of major changes) to
174 phpmyadmin-devel@lists.sourceforge.net
175 phpmyadmin-news@lists.sourceforge.net
176 phpmyadmin-users@lists.sourceforge.net
178 Don't forget to update the Description section in the announcement,
179 based on Documentation.html.
181 7. increment rc count or version in subversion :
182 - in libraries/Config.class.php PMA_Config::__constructor() the line
183 " $this->set( 'PMA_VERSION', '2.7.1-dev' ); "
184 - in Documentation.html the 2 lines
185 " <title>phpMyAdmin 2.2.2-rc1 - Documentation</title> "
186 " <h1>phpMyAdmin 2.2.2-rc1 Documentation</h1> "
187 - in translators.html
189 8. add a group for bug tracking this new version, at
190 https://sourceforge.net/tracker/admin/index.php?group_id=23067&atid=377408&add_group=1
192 9. the end :-)