Difference between revisions of "NewRelease"

From RackTables Wiki
Jump to navigation Jump to search
(→‎pre-release checklist: update procedures for git, paths and wording)
Line 1: Line 1:
 
== pre-release checklist ==
 
== pre-release checklist ==
 
First make sure, that all necessary changes are already committed into the repository:
 
First make sure, that all necessary changes are already committed into the repository:
* All release notes, if any, must appear both in upgrade script and in the README.
+
<ul>
* Current date must be present on the version line of <tt>ChangeLog</tt>.
 
* Make sure, that <tt>upgrade.php</tt> has new version listed in <tt>$versionhistory</tt> and <tt>executeUpgradeBatch()</tt>. It is normal to accumulate updates in <tt>executeUpgradeBatch()</tt> long before the release, this way on the release day you will have nothing to do in <tt>upgrade.php</tt>. But if you had no changes to DB since the last release, you are likely to see there changes missing. Just make sure the new version is in both places anyway.
 
* Bump up CODE_VERSION in <tt>inc/config.php</tt>. DON'T do this unless you really intend to make a release right now.
 
* svn stat; svn commit
 
  
Now export the codebase from the trunk (or maintenance branch, whichever you are releasing from) and test it.
+
<li>Make sure you have the right branch checked out and that no pending changes are in the working copy:
 
<pre>
 
<pre>
# export --force in case the target directory already exists
+
git status
svn export https://racktables.svn.sourceforge.net/svnroot/racktables/branches/maintenance-0.19.x .
 
 
</pre>
 
</pre>
* The application must be able to install itself with own installer. Once this is found working, dump the database:
+
<li>If the new release has any release notes, make sure these appear both in <tt>wwwroot/inc/upgrade.php</tt> and in <tt>README</tt>.</li>
 +
 
 +
<li>Update <tt>ChangeLog</tt> file to have the current date on the new version line.</li>
 +
 
 +
<li>Make sure, that <tt>upgrade.php</tt> has new version listed in <tt>$versionhistory</tt> and <tt>executeUpgradeBatch()</tt>. It is normal to accumulate updates in <tt>executeUpgradeBatch()</tt> long before the release, this way on the release day you will have nothing to do in <tt>upgrade.php</tt>. But if you had no changes to DB since the last release, you are likely to see there changes missing. Just make sure the new version is in both places anyway.</li>
 +
 
 +
<li>Bump up CODE_VERSION in <tt>wwwroot/inc/config.php</tt>. DON'T do this unless you really intend to make a release right now.</li>
 +
 
 +
<li>Produce a commit with all changes pending thus far:
 +
<pre>
 +
git status
 +
git add ChangeLog
 +
[...]
 +
git add wwwroot/inc/config.php
 +
git commit
 +
</pre>
 +
</li>
 +
 
 +
<li>Check the source code out from the same branch to a '''clean location''' to test it.
 +
<pre>
 +
git clone git://github.com/RackTables/racktables.git
 +
# git checkout maintenance 0.19.x
 +
</pre></li>
 +
 
 +
<li>The application must be able to install itself with own installer. Once this is found working, dump the database:
 
<pre>
 
<pre>
 
mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-fresh.sql
 
mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-fresh.sql
</pre>
+
</pre></li>
* Demo data should also be loadable and functional:
+
 
 +
<li>Demo data must be loadable without any errors:
 
<pre>
 
<pre>
 
mysql racktables_db < scripts/init-sample-racks.sql
 
mysql racktables_db < scripts/init-sample-racks.sql
</pre>
+
</pre></li>
* The release being tested must detect and upgrade a database from the previous release(s) correctly. Load the database with one of the previous releases data, then upgrade it with the current upgrader, then dump the DB. Now compare to the previous dump, there must be no meaningful differences.
+
 
 +
<li>The release being tested must detect and upgrade a database from the previous release(s) correctly. Load the database with one of the previous releases data, then upgrade it with the current upgrader, then dump the DB. Now compare to the previous dump, there must be no meaningful differences.
 
<pre>
 
<pre>
racktables/contribs/demoreload.sh X.Y.z racktables_db
+
/path/to/racktables-contribs/demoreload.sh X.Y.z racktables_db
# (upgrade.php)
+
# (make through upgrade.php)
 
mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-upgraded.sql
 
mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-upgraded.sql
 
diff -u ~/tmp/dump-fresh.sql ~/tmp/dump-upgraded.sql
 
diff -u ~/tmp/dump-fresh.sql ~/tmp/dump-upgraded.sql
</pre>
+
</pre></li>
* Test the source as much as you find possible.
+
 
* Look into the error log of the server you used for the tests. There shouldn't be any error/warning messages.
+
<li>Test the source as much as you find possible.</li>
The above rounds may happen repeated more, than once, until everything is fixed consistently.
+
 
 +
<li>Look into the error log of the server you used for the tests. There shouldn't be any error/warning messages.</li>
 +
 
 +
<li>Test and repeat until everything is fixed consistently.</li>
 +
</ul>
  
 
== the release itself ==
 
== the release itself ==

Revision as of 16:42, 2 September 2012

pre-release checklist

First make sure, that all necessary changes are already committed into the repository:

  • Make sure you have the right branch checked out and that no pending changes are in the working copy:
    git status
    
  • If the new release has any release notes, make sure these appear both in wwwroot/inc/upgrade.php and in README.
  • Update ChangeLog file to have the current date on the new version line.
  • Make sure, that upgrade.php has new version listed in $versionhistory and executeUpgradeBatch(). It is normal to accumulate updates in executeUpgradeBatch() long before the release, this way on the release day you will have nothing to do in upgrade.php. But if you had no changes to DB since the last release, you are likely to see there changes missing. Just make sure the new version is in both places anyway.
  • Bump up CODE_VERSION in wwwroot/inc/config.php. DON'T do this unless you really intend to make a release right now.
  • Produce a commit with all changes pending thus far:
    git status
    git add ChangeLog
    [...]
    git add wwwroot/inc/config.php
    git commit
    
  • Check the source code out from the same branch to a clean location to test it.
    git clone git://github.com/RackTables/racktables.git
    # git checkout maintenance 0.19.x
    
  • The application must be able to install itself with own installer. Once this is found working, dump the database:
    mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-fresh.sql
    
  • Demo data must be loadable without any errors:
    mysql racktables_db < scripts/init-sample-racks.sql
    
  • The release being tested must detect and upgrade a database from the previous release(s) correctly. Load the database with one of the previous releases data, then upgrade it with the current upgrader, then dump the DB. Now compare to the previous dump, there must be no meaningful differences.
    /path/to/racktables-contribs/demoreload.sh X.Y.z racktables_db
    # (make through upgrade.php)
    mysqldump --extended-insert=FALSE --order-by-primary racktables_db > ~/tmp/dump-upgraded.sql
    diff -u ~/tmp/dump-fresh.sql ~/tmp/dump-upgraded.sql
    
  • Test the source as much as you find possible.
  • Look into the error log of the server you used for the tests. There shouldn't be any error/warning messages.
  • Test and repeat until everything is fixed consistently.

the release itself

# from trunk (beta testing releases):
svn cp \
https://racktables.svn.sourceforge.net/svnroot/racktables/trunk \
https://racktables.svn.sourceforge.net/svnroot/racktables/tags/RackTables-0.Y.z

# from maintenance (stable releases):
svn cp \
https://racktables.svn.sourceforge.net/svnroot/racktables/branches/maintenance-0.Y.x \
https://racktables.svn.sourceforge.net/svnroot/racktables/tags/RackTables-0.Y.z

rolling out

  • Make a tarball:
svn export https://racktables.svn.sourceforge.net/svnroot/racktables/tags/RackTables-X.Y.z
tar czf RackTables-X.Y.z.tar.gz RackTables-X.Y.z
zip -r RackTables-X.Y.z.zip RackTables-X.Y.z
  • Upload the tarball and zipfile to SF FRS (from browser or by other means).
  • Open files section and set the newly uploaded tar.gz as "current".
    • Open properties form (round "i" sign) of the previous release tar.gz.
    • Unset all "default download for" checkboxes.
    • Unset "download button" text.
    • Save.
    • Open properties form (round "i" sign) of the previous release zip.
    • Unset Windows "default download for" checkbox.
    • Unset "download button" text.
    • Save.
    • In the latest tarball properties form, set all "default download for" checkboxes except Windows.
    • Set "download button" text to "latest stable".
    • Save.
    • In the latest zipfile properties form, set Windows "default download for" checkbox.
    • Save.
    • Hover the big green "download" button and watch the mouse hint featuring the right version number (sometimes it takes several minutes to see the update).
  • In MantisBT mark version as released (Manage, Manage Projects, RackTables, Versions).
  • Log into SF shell service:
$ cat ~/.ssh/config 
Host shell.sourceforge.net
	User YOUR_SF_USERNAME,racktables
$ ssh -t shell.sourceforge.net create
  • Edit (vim) /home/project-web/racktables/htdocs/header.php to update $lastrelease. Test the "download" link to work after that.
  • Post a Freecode (ex-Freshmeat) release announce
    • open http://freecode.com/projects/racktables
    • make sure you are logged in (check top bar)
    • use "submit a release" button to the right
    • fill in version number
    • update version number in "tar.gz" and "zip" URL fields
    • compose 1-2 paragraphs worth of text describing the focus of this release
    • proofread and submit (usually it takes several hours to pass the moderation)
  • Send a letter to the racktables-users list, if necessary.
  • Update demo.racktables.org to the current release ($demorelease will need an update). Below is a sample CLI session of updating the demo to 0.19.13:
svn export https://racktables.svn.sourceforge.net/svnroot/racktables/tags/RackTables-0.19.13
cd contribs/
git pull
cd
crontab -e
cp local.php secret.php RackTables-0.19.13/wwwroot/inc/
rm www/index.php
ln -s ../RackTables-0.19.13/wwwroot/index.php www/index.php
./contribs/demoreload.sh 0.19.13 rackdemo
  • Update IRC channel topic