=======
release
=======

The release module provides a script to release an egg.

The steps are:

- running tests
- raising the version in setup.py
- building the changes
- creating a branch vor this version
- creating a tag
- uploading over cheeseshop
- sending a mail that list the changes

Let's set the curdir to the package we work on, because releaser uses
the current working directory to work::

    >>> import os
    >>> package_dir = os.path.join(test_dir, 'data', 'my.package')
    >>> os.chdir(package_dir)

Let's get the version::

    >>> import packet
    >>> packet.get_version()
    '0.1'

There's also a `version.txt` for plone products::

    >>> cat('my', 'package', 'version.txt')
    0.6.0

First step, let's check the tests passes::

    >>> packet.check_tests()
    True

Now that we are sure all tests passes, let's raise the version::

    >>> packet.raise_version('0.2')
    >>> print packet.get_version()  
    0.2

If a `version.txt` is found then the version is updated too::

    >>> cat('my', 'package', 'version.txt')
    0.2

Let's build CHANGES::

    >>> cat('CHANGES')
    trunk (200...)
    ==================
    <BLANKLINE>
      - added the cool feature
    <BLANKLINE>
    0.1 (200...)
    ================
    <BLANKLINE>
      - initial version created by IngeniSkel
    <BLANKLINE>
    <BLANKLINE>

    >>> packet.increment_changes()
    >>> cat('CHANGES')
    trunk (200...)
    ==================
    <BLANKLINE>
      - xxx [Ingeniweb]
    <BLANKLINE>
    0.2 (200...)
    ================
    <BLANKLINE>
      - added the cool feature
    <BLANKLINE>
    0.1 (200...)
    ================
    <BLANKLINE>
      - initial version created by IngeniSkel
    <BLANKLINE>
    <BLANKLINE>

Now let's commiting the changes over subversion::

    >>> packet.create_tag()
    svn path was existing, removed
    copied http://xxx/my.package/trunk to http://xxx/my.package/tags/0.2

This creates a branch and a tag for the version.


