Purpose of this document
------------------------
This document lists the steps needed to make a project release.


Before the release
------------------
- If necessary, update the TODO file
- If necessary, add an upgrade method to UserDefaultsUpdater
- Make sure that no debugging stuff has been forgotten in the code (e.g. search
  for "xxx")
- Check if the Preferences dialog opens on the "General" tab (sometimes when I
  fiddle around in Interface Builder, I forget to switch back to the "General"
  tab)
- Update the ChangeLog
  - The main source for this is the git commit log
  - Also add notes about changes to the user defaults, especially if some of
    the user's preferences are clobbered by UserDefaultsUpdater
- Replace the "Changes in this release" section of the README with a collection
  of the most important entries from the ChangeLog
- Change the release date in the following files:
  - Roadmap
- Make sure that the version number is up to date in the following files:
  - README
  - Info.plist
- Increase CFBundleVersion in Info.plist (Xcode also makes this available on
  the summary page of the project, as the field labelled "Build")
- Make sure that the copyright year is up to date in the following files (e.g.
  2009-2011 instead of 2009-2010):
  - All source files
  - Info.plist
- Commit final changes (check with "git status" that nothing was forgotten)


Create an archive & app bundle
------------------------------
- In the toolbar's scheme selector, activate the scheme "dgsmonX Release"
- Select the "My Mac 32-bit" destination (actually it doesn't matter what
  destination is selected because the build will always create a fat binary
  that includes both the 32 and 64 bit architectures)
- From the menu, select Product > Archive
- The application is now built using the "Release" build configuration
- After the build succeeds it is archived, then the "Organizer" window opens to
  display the archive that was just created
- Give it a useful name, e.g. "dgsmonX 0.2"
- Click the "Share..." button
- From the list of content options, select "Application"
- Click the "Next" button which will pop up a save dialog
- Save the app bundle to a version-specific subfolder below the "dist" folder
  (e.g. "dist/0.2/dgsmonX.app"). This is the location where the makedist.sh
  script expects to find the app bundle.


Perform final tests
-------------------
- Run the application from the "dist" subfolder where the bundle was stored in
  the previous step
- Perform tests suitable to make sure that everything still works as intended.
- It's important to do this OUTSIDE OF THE DEVELOPMENT ENVIRONMENT (= Xcode),
  i.e. launch the application from the Finder (yes, this can have an impact!)


Make the release
----------------
- Tag and sign the release
  cd <projectdir>
  git tag -s -m "tagging release x.y" x.y <commit hash>
- Update the blessed repository
  cd <projectdir>
  git push
  git push --tags
- Generate the source and binary distributions
  - Go to terminal
  - Launch "<path-to-project-folder>/makedist.sh 0.1"
  - The distribution files are placed in <project-folder>/dist
- Make the source and binary distributions available on the project website
  - Create a new directory in the public web space
  - Copy ChangeLog, README, disk image file (.dmg) and tar ball (.tar.gz)
    into the new directory
  - Update the "download latest" link on http://www.herzbube.ch/software
- Add the new version number to the bug tracker so that issues can be reported
  once the release has been made public
- Update the project website to announce the new release


After the release
-----------------
- Cleanup
  cd <projectdir>
  rm -r dist build
- Bump the version number to the next planned release; check above under
  "Before the release" which files are affected
