.. _release:
.. role:: strike

************************
PySAL Release Management
************************

.. contents::

Prepare the release
-------------------


- Check all tests pass.

- Update CHANGELOG::

     $ git log --pretty="%h %an -%s" --since="2013-02-01" >> cghlog

  - Prepend `chglog` to `CHANGELOG` and edit

- Edit THANKS and README and README.md if needed.

- Change MAJOR, MINOR version in setup script.

- Change pysal/version.py to non-dev number

- Change the docs version from X.xdev to X.x by editing doc/source/conf.py in two places.

- Commit all changes.

Tag 
---
Make the Tag::

  $ git tag -a v1.4 -m 'my version 1.4'

On each build machine, clone and checkout the newly created tag::

  $ git clone http://github.com/pysal/pysal.git
  $ git fetch --tags
  $ git checkout v1.4

Make docs
---------
Make the html docs:: 

  $ cd doc
  $ make html 

Create a new directory on doc server and copy new docs to it::
  
  $ mkdir -p /srv/www/pysal/public_html/<X.x>
  $ rsync -ruz doc/build/html/ geodacenter.org:/srv/www/pysal/public_html/<X.x>  (no trailing slash!)

Now, compress the HTML and upload it to the GeoDa Center server.

Make and Upload distributions
-------------------------------

- Make and upload_ to the Python Package Index in one shot!::

   $ python setup.py sdist  (to test it)

   $ python setup.py sdist upload

  - if not registered_, do so. Follow the prompts. You can save the
      login credentials in a dot-file, .pypirc

- Make and upload binary installers to the GeoDa Center server.

  - Make a graphical Windows installer on a Windows box:: 

    $ python setup.py bdist_wininst

Announce
--------
- Draft and distribute press release on geodacenter.asu.edu, openspace-list, and pysal.org

  - On GeoDa center website, do this:
   - Create a news item (copy the openspace announcement and designate a custom URL)
   - "List" Content and filter by "Featured Project". Choose to 'edit' PySAL and then modify the short text there.
   - If you click PySAL, you'll be directed to the PySAL project page, where you can edit the text there.

- Add link to released docs on Google Code site (pysal.geodacenter.org/<X.x>/index.html)

Put master back to dev
---------------------
- Change MAJOR, MINOR version in setup script.

- Change pysal/version.py to dev number

- Change the docs version from X.x to X.xdev by editing doc/source/conf.py in two places.

.. _upload: http://docs.python.org/2.7/distutils/uploading.html
.. _registered: http://docs.python.org/2.7/distutils/packageindex.html
.. _source: http://docs.python.org/distutils/sourcedist.html
