Releasing and tagging Software

Before tagging and releasing, make sure all tests run successfully with the new version of your component.

$ ./bin/test

Knowing your extension has tests, run them and any other tests for extensions that depend on your extension. If your extension does not have test. It should!

Creating a tag of a Zope product

  1. Run tests.

  2. Fill the HISTORY.txt using valid ReST. Replace the (unreleased) at the end of line with the current date using the following format (year/month/day).

  3. Remove the (unreleased) in the version.txt file if the file exists, and double check that the version number there and in HISTORY.txt are correct (i.e. corresponds to the branch and have not been released yet).

  4. Do a svn commit.

  5. Create the tag:

    $ svn cp product/branch-or-trunk product/tag/product_name-version/
    
  6. Edit HISTORY.txt to add a new header:

    ProductName version (unreleased)
    --------------------------------
    
    - ....
  7. Edit version.txt to increase the version, and add (unreleased) at the end.

Creating a Python-only extension tag

  1. Run the tests.

  2. Fill the HISTORY.txt using valid ReST. Replace the (unreleased) at the end of the line with the current date using the following format (year/month/day). Check that the README.txt is up to date with the latest information.

  3. Check the validity of your documentation:

    $ python2.x setup.py egg_info
    

    Should not give an error, and:

    $ python2.x setup.py --long-description | rst2html > description.html
    

    This also should not produce and error. Open description.html in your web browser and check that the document is okay.

  4. Do a svn commit.

  5. Create the tag:

    $ svn cp extension/branch-or-trunk extension/tag/extension_name-version
    
  6. Do a new check-out of your tag:

    $ svn co extension/tag/extension_name-version release
    $ cd release
    
  7. In the checkout, edit setup.py and remove the dev marker from the version.

  8. Commit these changes (this is the one exception to the rule that you should never check in anything on a tag.):

    $ svn commit -m "Remove dev marker."
    
  9. Upload your egg on http://infrae.com/download:

    Open up your ~/.pypirc file and make sure it has an entry for infrae.com

    [distutils]
    index-servers = pypi
                    infrae
    [pypi]
    username = user
    password = password
    
    [infrae]
    username = user
    password = password
    repository = http://infrae.com/download
    realm = Zope
    

    Next, run the update

    $ python2.x setup.py register sdist upload -r infrae
    
  10. Go back to your trunk or branch checkout:

    $ cd ..
    $ rm -rf release
    
  11. Update the version in setup.py.

  12. Update docs/HISTORY.txt to add a new header for that version:

    ProductName version (unreleased)
    --------------------------------
    
    - ....
  13. Commit the changes: svn commit

Creating a tag of a Zope product packaged as an Python extension

  1. Run tests.

  2. Create a tag of the Zope product like described before (see Creating a tag of a Zope product).

  3. Check the validity of your documentation:

    $ python2.4 setup.py egg_info
    

    should not give an error, and neither should:

    $ python2.4 setup.py --long-description | rst2html > description.html
    

    Open description.html in a web browser and check the documentation.

  4. Do a svn commit.

  5. Create the tag:

    $ svn cp extension/branch-or-trunk extension/tag/extension_name-version
    
  6. Do a new check-out of your tag:

    $ svn co extension/tag/extension_name-version release
    $ cd release
    
  7. In the checkout, edit setup.py and remove the dev marker from the version.

  8. In the Products sub-folder, edit the svn:externals properties to use the Zope product you tagged:

    $ svn propedit svn:externals Products
    
  9. Update to be sure you have the latest code of the tag:

    $ svn up
    
  10. Commit the changes (this is the one exception to the rule that you should never check in anything on a tag.):

    $ svn commit -m "Remove dev marker."
    
  11. Upload your egg on https://infrae.com/download:

    (You should have configured your .pypirc file before)

$ python2.4 setup.py register sdist upload -r infrae
  1. Go back to your trunk or branch checkout:

    $ cd ..
    $ rm -rf release
    
  2. Update the version in setup.py.

  3. Commit the changes: svn commit.

blog comments powered by Disqus