Jump to navigation Jump to search
Use the web interface to complete the installation. When prompted to set the admin password, enter 'admin'.
Load the sample data.
Export the database to the tests/data dir.
Run the unit tests. Fix any failures.
Test the source by hand 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.
Do not proceed further until everything is fixed consistently.
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:
- 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 getUpgradeBatch(). It is normal to accumulate updates in getUpgradeBatch() 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 email@example.com:RackTables/racktables.git cd racktables git checkout master # or maintenance
- 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.
# reload using the previous release /path/to/racktables-contribs/demo.racktables.org/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
- Setup a fresh database and grant access to the 'racktables' user. This will be used to create a sample data file that unit tests can utilize.
part 2 (unit testing)
DROP DATABASE IF EXISTS racktables_unittest; CREATE DATABASE racktables_unittest CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON racktables_unittest.* TO racktables@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';
mysql -u racktables -p racktables_unittest < scripts/init-sample-racks.sql
mysqldump --skip-comments -u racktables -p racktables_unittest > tests/data/$CODE_VERSION.sql
cd tests phpunit
part 3 (finalization)
the release itself
git tag RackTables-X.Y.z git push origin RackTables-X.Y.z
producing and publishing deliverables
- Delete the 'tests' directory. It is several megabytes in size and will only be used by developers. Users can obtain the tests using git, if desired.
- Make two archives:
export TAG='RackTables-X.Y.z' git archive --prefix=$TAG/ -o $TAG.tar.gz $TAG git archive --prefix=$TAG/ -o $TAG.zip $TAG
- 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.
- Open properties form (round "i" sign) of the previous release zip.
- Unset Windows "default download for" checkbox.
- Unset "download button" text.
- In the latest tarball properties form, set all "default download for" checkboxes except Windows.
- Set "download button" text to "latest stable".
- In the latest zipfile properties form, set Windows "default download for" checkbox.
- 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).
- Tip: to update the banner text below the file list of the SF's "Files" section, open a terminal connection to SF shell and edit the file /home/frs/project/racktables/README.md (once done, let the SF 5-10 minutes to start using the updated revision).
- In MantisBT mark version as released (Manage, Manage Projects, RackTables, Versions).
updating the main web-site
- Log into SF shell service:
$ cat ~/.ssh/config Host shell.sourceforge.net User YOUR_SF_USERNAME,racktables $ ssh -t shell.sourceforge.net create # upon logging in update $lastrelease $ vim /home/project-web/racktables/htdocs/header.php # test the "download" link at racktables.org to work
updating other news feeds
- Send a letter to the racktables-users list (even more so after Freshmeat/Freecode is gone).
- Update IRC channel topic
- Produce a helper SQL file for the current release in racktables-contribs.
- Copy the previous init-full-X.Y.z.sql to current init-full-X.Y.z.sql and git add the new file.
- Take a clean RackTables instance of the current release (either use demoreload on the previous release or install manually).
- Make an SQL dump of this new installation like this: mysqldump --extended-insert=FALSE --order-by-primary racktables_db > init-full-X.Y.z.sql
- Edit permissions like this.
- git add -i the new file again (note interactive add). Use patch mode to add relevant chunks. Quit.
- git commit; git push
- 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.20.3:
cd ~/racktables git pull git checkout RackTables-0.20.3 ln -s ~/racktables ~/RackTables-0.20.3 # secret.php is already in wwwroot/inc/ # local.php is already in plugins/ cd ~/racktables-contribs/ git pull cd ~/racktables-contribs/demo.racktables.org/demoreload.sh 0.20.3 rackdemo crontab -e # ../../racktables/wwwroot/index.php is already linked as www/demo/index.php