Preparing a release for distribution

From WeBWorK
Jump to: navigation, search

Making WeBWorK tarballs is fun and easy! Anyone can do it! In this example, we'll make tarballs for the final 2.2 release, tag rel-2-2-0.

Step 1: Update README to contain current release notes and LICENSE to reflect current version number. Make sure lib/WeBWorK.pm contains the correct versions number in $main::VERSION.

For example: wget -O- 'http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKRelease2pt1pt3?skin=plain' | perl -pe '$/=undef;$_=<>;s|<ul>.*?</ul>||s' | lynx -dump -stdin > README.new

Step 2: Tag a point on the rel-2-2-dev branch as rel-2-2-0. Do this from within an up-to-date working directory on the rel-2-2-dev branch.

( cd webwork2 && cvs tag rel-2-2-0 )
( cd pg && cvs tag rel-2-2-0 )

Note: Steps 3-6 can be done with the mkdist script (in admintools). Edit before running to set the proper release tag. perl mkdist 2.4.7 produces a rel-2-4-7 tarball with links to rel-2-4-patches updates.

Step 3: Check out the source for rel-2-2-0 from anonymous CVS.

cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/system checkout -r rel-2-2-0 -d webwork-2.2 webwork2
cvs -d :pserver:anoncvs@cvs.webwork.rochester.edu:/webwork/cvs/system checkout -r rel-2-2-0 -d pg-2.2 pg

Step 4: Convert the Tag to rel-2-2-dev so that people can track bugfixes. This seems like the best choice, since if people want to stick with 2.2, they'll just not update, and if they want to get patches, they don't have to change the branch.

( cd webwork-2.2 && find . -regex '.*/CVS/\(Tag\|Entries\)' -print0 | xargs -0 perl -pi -e 's/rel-2-2-0$/rel-2-2-dev/' )
( cd pg-2.2 && find . -regex '.*/CVS/\(Tag\|Entries\)' -print0 | xargs -0 perl -pi -e 's/rel-2-2-0$/rel-2-2-dev/' )

Step 5: Tar them up, and compress them as both GZip and BZip2 archives.

tar -czf webwork-2.2.tar.gz webwork-2.2
tar -cjf webwork-2.2.tar.bz2 webwork-2.2
tar -czf pg-2.2.tar.gz pg-2.2
tar -cjf pg-2.2.tar.bz2 pg-2.2

Step 6: Give them to SourceForge: http://sourceforge.net/project/admin/editpackages.php?group_id=93112

My upload procedure (by hand) is more complex than the one suggested in mkdist

sftp myname@frs.sourceforge.net
Connecting to frs.sourceforge.net...
The authenticity of host 'frs.sourceforge.net (216.34.181.57)' can't be established.
DSA key fingerprint is be:......
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'frs.sourceforge.net' (DSA) to the list of known hosts.
myname@frs.sourceforge.net's password: 
sftp> cd /home/frs/project/o/op/openwebwork
sftp> cd pg/2.4.7
sftp> mput *.tar.*  
Uploading pg-2.4.7.tar.bz2 to /incoming/e/ea/eatongage/uploads/pg-2.4.7.tar.bz2
pg-2.4.7.tar.bz2                                                                    100%  436KB 435.7KB/s   00:01    
Uploading pg-2.4.7.tar.gz to /incoming/e/ea/eatongage/uploads/pg-2.4.7.tar.gz
pg-2.4.7.tar.gz                                                                     100%  529KB 528.9KB/s   00:01 
sftp> cd ../../webwork2/2.4.7   
Uploading webwork-2.4.7.tar.bz2 to /incoming/e/ea/eatongage/uploads/webwork-2.4.7.tar.bz2
webwork-2.4.7.tar.bz2                                                               100% 4559KB   1.1MB/s   00:04    
Uploading webwork-2.4.7.tar.gz to /incoming/e/ea/eatongage/uploads/webwork-2.4.7.tar.gz
webwork-2.4.7.tar.gz                                                                100% 4696KB   1.2MB/s   00:04    
sftp> exit

Step 7: Add the release to /webwork/docs2html:

cvs -d /webwork/cvs/system checkout -r rel-2-2-0 -d webwork2_rel-2-2-0 webwork2
cvs -d /webwork/cvs/system checkout -r rel-2-2-0 -d pg_rel-2-2-0 pg
follow us