Releasing a new version of BlueBream
====================================

#. First, run the buildout in an isolated virtualenv::

    $ virtualenv --distribute --no-site-packages sandbox
    $ ./sandbox/bin/python bootstrap.py
    $ ./bin/buildout

#. If needed, update the versions of packages in `versions.cfg`.

    You should probably check and extend the latest version of the ZTK.
    Check it here: http://download.zope.org/zopetoolkit/
    For the additional packages, you can discover new versions by running::

    $ ./bin/checkversions buildout.cfg  # (use the -l option if needed)

#. Run the tests for the bluebream template and additional packages::

    $ ./bin/buildout
    $ ./bin/test

#. If you made some significant changes in the project template (not only the
   versions), update the LAST_TEMPLATE_CHANGE marker in `versions.cfg` to the new
   version. It will allow people to be warned about the new version of the
   template when creating a new project. Example::

    # The marker below gives the last version with
    # significant changes in the project template:
    # LAST_TEMPLATE_CHANGE = 1.0.2

#. If all tests pass, release a new version using the included `zest.releaser`::

    $ ./bin/prerelease
    $ ./bin/release
    $ ./bin/postrelease

    If you want to do the same manually, it corresponds to the following steps:

    - set the correct version number in `setup.py`
    - update the `CHANGES.txt`
    - commit, and create a svn tag for this new version
    - change `setup.py` and the `CHANGES.txt` to point to the next dev version
    - create a clean checkout of the tag in a new directory and run:
    $ python setup.py register sdist upload

#. Update the http://download.zope.org/bluebream/ site:

   - copy the ``versions.cfg`` file from the tag folder to the ``downloadsite``
     folder with the correct versionned name
     (Subversion URL for downloadsite:
      svn://svn.zope.org/repos/main/bluebream/downloadsite/ )
   - update the ``downloadsite/index.html`` page with the new release. The
     download site will be updated automatically in less than 15min.

#. Create an announcement on the bluebream mailing list (based on a previous
   announcements)

#. Update the ``downloadsite/index.html`` with this announcement when the link
   is available in the `list archive
   <https://mail.zope.org/pipermail/bluebream/>`_

Then spread the word, blog, tweet, etc.!

