CcPublisher Release Procedure

From Creative Commons
Jump to: navigation, search

This page documents the procedure used when creating a new release of ccPublisher. Instructions assume you have successfully checked out a sandbox from Subversion, as described here.

Increment Version Number

The version number currently needs to be updated in four places. This will be corrected in the future (see Issue 102).


This is no longer required as of ccPublisher 2.1

The pyarchive package is responsible for assembling metadata and uploading files to the Internet Archive. The file contains the version number as part of the uploading application identification. For example, the current release contains the following code that would need updated for a new release:

       <upload_application appid="ccpublisher" version="1.9.3" />
       """ % (self.title, self.collection, self.mediatype) )


The version.txt contains the current version number and is used for the about box and other user-visible locations. This file is located in the resources directory of a ccPublisher checkout.


setup.nsi, located in the deploy/win32 directory of a Subversion checkout, contains instructions for building the installer for Windows. The version number appears near the top of the file. The line similar to

  !define VERSION

needs to be updated before the installer is generated. Note that this must be a 4 digit version number.

This is no longer required as of ccPublisher 2.1 is the primary distutils build script for ccPublisher. The version parameter passed to the setup function must be updated.

Branch or Tag Subversion

When creating a release, it's important to tag or branch the Subversion repository with version information. In general branches are only for major releases (2.0, etc), while tags are made for each release. You can tag Subversion using a command such as:

 $ svn cp svn+ssh://<username> svn+ssh://<username>

This will create a copy of the current repository trunk as a tag (in the example above for 2.0 beta 3). Note that this only tags changes which have been committed; changes which are in your local sandbox are not included in the tagged copy.

Branching is performed in a similar fashion.

 $ svn cp svn+ssh://<username> svn+ssh://<username>

Create Packages

The package creation process varies slightly for different platforms. We will have scripts for this, we just haven't found the right tool. Ideally something like Ant, but without the Java overhead. Suggestions welcome.


We currently distribute tarballs of ccPublisher for Linux. There is some support for building RPMs in Subversion, but it is far more fragile than the simple tarball support. To build a tarball from your checkout:

 $ python sdist

Distutils will create a tarball containing all the code necessary for ccPublisher in the dist directory with the filename ccPublisher-X.Y.Z.tar.gz, where X.Y.Z is the version number.


The py2exe distutils extension takes a Python script, assembles the dependencies, and creates an executable stub along with the dependencies. To build the application byte code and loader, run the following command:

 C:\publisher> c:\python24\python.exe py2exe

This will assemble the necessary files in the dist subdirectory. When building ccPublisher, you will see ccpublisher.exe; this is the main application.

Once the application is built, an installer must be created. ccPublisher uses NSIS to create Windows installation packages. The script used to build the installer is deploy/win32/setup.nsi. If you are using Eclipse, the EclipseNSIS plugin allows you to build the installer from within Eclipse. The NSIS wiki has documentation on other ways to use NSIS. After building the installer you'll be left with setup.exe in the working directory (deploy/win32 under Eclipse).

Mac OS X

The py2app distutils extension takes a Python script, assembles the dependencies, and creates an executable bundle for Mac OS X. To build the application byte code and loader, run the following command:

 $ python2.4 py2app

Note that ccPublisher does require Python 2.4, while 2.3 is included with Mac OS X. You can download a Python 2.4 Framework Build for OS X at After running the py2app build, the dist directory will contain the application bundle, An application bundle is actually a directory which contains information used to load the app. Zip this directory up for distribution, using the following commands. Note that the -y parameter is important -- it causes symbolic links to be stored as links and not resolved.

 $ cd dist
 $ zip -ry

Create the Application Identifier in Roundup

Roundup uses Application identifiers for grouping auto-reported crash reports. Create a new Application object in the ccPublisher Tracker with the appropriate application identifier and version number specified in version.txt.

Distribute Packages

Packages are currently distributed from the Berlios project page.

Update the Wiki

Ant Tutorial Create a release page and update the latest release on CcPublisher.