How to release a new version of monotone
----------------------------------------

0) Make sure that the buildbot looks reasonably green.  Let's not
   release stuff that's known to be broken on any major platforms, eh?

1) Write user-readable release notes at the top of the NEWS file,
   roughly following the format of existing entries.  Make sure to
   mention any incompatibilities at the top, and generally it's a good
   idea to put cool new stuff above nice-but-not-as-exciting stuff.

   A useful command:

     $ mtn log -r h:net.venge.monotone --to t:monotone-*

   Commit your release notes, so other people can see them.

1.5) Get people to read over your release notes, it's really easy to
   make mistakes or have stupid grammatical errors here.

2) Update the UPGRADE file.  At the very least, bump the version
   number in the first line.  This file should always contain a
   complete description of how to upgrade from any version of monotone
   to the latest release -- you may need to tweak or remove earlier
   entries to keep this true.

   Commit your changes.

3) Double-check that INSTALL, AUTHORS, and README don't need any
   updates.  If they do, make them.

4) Update version numbers.  The following files need to be touched:
     configure.ac: change the call to AC_INIT
     monotone.spec: change the "Version:" field, and add an entry to
       the %changelog section.
     win32/monotone.iss: the version number is mentioned several times
       in this file, make sure to replace them all.
     visualc/config.h: again, the version number is mentioned several
       times, don't miss any.
     debian/changelog: rather than modifying this file directly, run
       the command "debchange -v <NEW VERSION>-0.1".  (If you screw up
       and need to roll a new unofficial package, use "debchange -i"
       to increment this number.)

   Commit your changes.

5) Okay, everything should be ready to go... double-check that:
     -- you've done the above steps correctly
     -- you've entered the correct date at the top of the NEWS file
        (esp. important when you wrote the notes a few days ago so
        people could look them over!)

6) Build and test the source package, in a clean checkout (if you use
   your main workspace, you increase the changes of accidentally
   picking up weird stuff):

   $ mtn co -r h:net.venge.monotone SOMEDIR
   $ cd SOMEDIR
   $ autoreconf -i && ./configure && make distcheck

   Wait a long time, eventually it will either bomb out, or say
   "monotone-0.<whatever>.tar.gz is ready for distribution".  If it
   bombs out, fix it, otherwise, SOMEDIR/monotone-<NEW VERSION>.tar.gz
   is the source package.

7) Build docs for the website:

   $ tar xvzf SOMEDIR/monotone-<NEW VERSION>.tar.gz
   $ cd monotone-<NEW VERSION>
   $ ./configure
   $ make monotone.pdf html

8) Upload everything to the website (uses monotone):

   # This requires that you have registered a SSH version 2 public key
   # with the administrators of monotone.ca, currently richard@levitte.org.
   #
   $ mkdir <NEW VERSION>
   $ mv SOMEDIR/monotone-<NEW VERSION>.tar.gz <NEW VERSION>/
   $ scp -r <NEW VERSION> mtn-uploads@monotone.ca:downloads/

   # The rest is done via monotone.
   #
   $ mtn -d DATABASE co -b net.venge.monotone.web WEBDIR
   $ cp monotone-<NEW VERSION>/{NEWS,INSTALL,UPGRADE,README,monotone.pdf,monotone.html} \
         WEBDIR/
   $ rm -rf WEBDIR/docs
   $ cp -r monotone-<NEW VERSION>/html WEBDIR/docs
   $ rm WEBDIR/figures/*
   $ cp monotone-<NEW VERSION>/figures/*.png WEBDIR/figures/
   $ cd WEBDIR
   $ mtn drop --missing
   $ mtn add --unknown
   $ mtn ci -m "Updates related to the release of monotone <NEW VERSION>"
   $ mtn sync

9) Update index.html on the website to state the latest version at the
   top, and modify the list of download links to point to the new
   version.

   $ cd WEBDIR
   $ vi index.html
   $ mtn ci -m "Updates related to the release of monotone <NEW VERSION>"
   $ mtn sync

10) Update downloads.html on the website similarly.

    [Richard's comment: Huh?]

11) Once you're pretty sure things have gone well, tag the source:

    $ mtn tag <REVISION> monotone-<NEW VERSION>
    
    This is the last possible moment to back out!

    $ mtn sync

12) Change the topic in the IRC channel to state the new version
    number.

13) Send out a release announcement.  Format is something like:

    To: monotone-announce@nongnu.org
    CC: monotone-devel@nongnu.org
    Subject: [ANNOUNCE] monotone <NEW VERSION> released

    <a few lines stating the new version and where the website is>

    <the release notes copy/pasted from the top of NEWS>

    <sign off>

14) Submit a release announcement to freshmeat.net.

15) Note any mistakes you made and update this file accordingly for
    next time.

16) Party!
