Steps before a release is done
------------------------------

Check all is crispy

  ./setup.py clean build
  ./setup.py clean sdist


Edit the ``fades/_version.py`` file properly, then tag and commit/push

  git tag release-VERSION
  git commit -am "Release VERSION"
  git push --tag


How to release it to PyPI
-------------------------

Dead simple:

    ./setup.py sdist upload


How to create a .deb
--------------------

Create the tarball:

  ./setup.py clean sdist


Copy this tarball to a clean dir, renaming as "orig"

  mkdir /tmp/fades_pack
  cp dist/fades-X.Y.tar.gz /tmp/fades_pack/fades_X.Y.orig.tar.gz
  cd /tmp/fades_pack


Most of next instructions come from http://wiki.debian.org/Python/GitPackaging

  tar -xf fades_X.Y.orig.tar.gz
  cd fades-X.Y
  git init
  git add .
  git commit -m "import fades_X.Y.orig.tar.gz"
  git checkout -b upstream
  pristine-tar commit ../fades_X.Y.orig.tar.gz upstream
  git-dpm init ../fades_X.Y.orig.tar.gz


Copy the project's debian dir and change changelog (be sure that this
"debian" dir is properly updated in the project... notably, be sure
copyright year is current one and also that no new dependencies were
introduced since last release).

  cp -pr $DEVEL/fades/pkg/debian .
  dch   # doing the following:
    - version should be   (X.Y-1) unstable
    - just leave one "* Initial release."


Continue with preparations:

  git add debian/*
  git commit -m "Added debian dir."
  git-dpm prepare
  git-dpm status


Build the .deb

    debuild -us -uc -I -i


To test the .deb you just created:

    sudo dpkg i *.deb


If you want to uninstall it do:

    sudo dpkg -r fades


How to release it to Debian
---------------------------

Need just to report a bug very similar to this one:  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814913

For that, just run the following and answer the questions:

    reportbug -B debian

(I had to do that twice, not sure why: first time it asked some questions and then errored out, second time it picked up from there and finish the job)


How to release it to Arch
-------------------------

Edit ``pkg/archlinux/PKGBUILD`` and set *pkgver* and *md5sums*, then run
*makepkg -S* inside the same directory that PKGBUILD. It will generate a
file named 'fades-X.X-X.src.tar.gz'.

Finally submit this file at the AUR page.


How to release it to the Snap store
-----------------------------------

Edit the snapcraft yaml and change the "version" number

    vi pkg/snap/snapcraft.yaml

Build the snap:

    snapcraft

Push it to the store and release:

    snapcraft push fades_6.0_amd64.snap
    snapcraft release fades 9 stable


How to sign the files
---------------------

If you are putting files to download (notably, installators: .deb,
tarballs, etc) it's a good idea to sign them and offer checksums, in
case of somebody wanting to validate the files.

To sign it:

    gpg --armor --sign --detach-sig FILENAME

To create the checksum:

    sha1sum FILENAME > FILENAME.sha1


Final steps
-----------

- Remember to update the .deb and .tar.gz in www.taniquetil.com.ar/fades

- Create a change log and send press release, announces, tweets, etc...
