How to make a release     -*- shell-script -*-

Version scheme
--------------

- Release = x.y  (y is even)
- Snapshot = x.$((y+1)).$(date +%Y%m%d)

The release number follows the Gnits standard (only 2 numbers to avoid
complex versions). If a quick fix is necessary to the latest release,
while the development version is unstable, we may branch and use
x.y.z.

The snapshots use a separate branch (x.y+1) to clearly distinguish
them from stable releases, and allow the stable branch to make a x.y.z
bugfix release without conflicting with the snapshots.

The next release has a version number higher than the latest snapshot,
so that people tracking the snapshots also upgrade when there is a new
release.


Bootstrapping
-------------

Cf. doc/bootstrap.txt in the FreeDink source code.


On the developer computer:
--------------------------

VERSION=3.10
cd dfarc/
git checkout -b branch-$VERSION-stable
git2cl > ChangeLog
# Edit NEWS
# Edit configure.ac (AC_INIT)
# Sync debian/
# Sync freedink-dfarc.spec
# Edit freedink-dfarc.spec (Version/Release + %changelog)
# (Note: po/dfarc.pot is updated by toplevel Makefile.am)

make distcheck
git commit -am "Release $VERSION"
git tag -s v$VERSION -m v$VERSION -u ...
git push origin branch-$VERSION-stable master
git push --tags
# Here you can test the release in the autobuilder

# Cleanly merge stable branch back to trunk
git checkout master
git merge branch-$VERSION-stable --no-commit
# Edit configure.ac (AC_INIT)
# Edit NEWS
git commit


On the autobuilder:
-------------------

./dfarc-snapshot.sh release $VERSION
./dfarc-exe.sh $VERSION
./dfarc-debs.sh $VERSION # as root
./dfarc-rpms.sh $VERSION # in a Fedora vserver


On the maintainer computer:
---------------------------

# http://www.gnu.org/prep/maintain/html_node/FTP-Upload-Directive-File-_002d-v1_002e1.html
gpg --sign -b dfarc-$VERSION.tar.gz
cat <<EOF | gpg --clearsign -a > dfarc-$VERSION.tar.gz.directive.asc
version: 1.1
directory: freedink
filename: dfarc-$VERSION.tar.gz
EOF
lftp -e "mput dfarc-$VERSION.tar.gz*; exit" -u anonymous, ftp-upload.gnu.org/incoming/ftp/
# Check ftp://ftp.gnu.org/gnu/freedink/

# Pristine TAR - efficienty storing the release in the Git repository
pristine-tar commit dfarc-$VERSION.tar.gz v$VERSION
git push origin pristine-tar

# Upload sigs to freedink.org


On the website:
---------------

PACKAGE=dfarc
DISTRO_PACKAGE=freedink-dfarc
cd www/releases/

mv ../snapshots/$PACKAGE/$VERSION/ $PACKAGE/
ln -nfs ../../releases/$PACKAGE/$VERSION ../snapshots/$PACKAGE

pushd debian
    for f in ../../snapshots/debian/$DISTRO_PACKAGE*$VERSION*; do
        mv $f .
        ln -nfs ../../releases/debian/$(basename $f) $f
    done
    make
popd

# On a Fedora vserver:
pushd fedora
    for f in ../../snapshots/fedora/$DISTRO_PACKAGE-*$VERSION*; do
        mv $f .
        ln -nfs ../../releases/fedora/$(basename $f) $f
    done
    make
    cp -a ../../snapshots/fedora/$DISTRO_PACKAGE.spec .
popd


Submit the release to:
----------------------

- GNU
  info-gnu@gnu.org
- Savannah / GNU Planet
  http://savannah.gnu.org/p/freedink
- freshmeat
  http://freshmeat.net/projects/freedink/
- Translation Project
  http://translationproject.org/html/maintainers.html
- Dink Network (.zip releases)
  http://www.dinknetwork.com/contribute/version/new/dfarc_3/
  http://www.dinknetwork.com/contribute/version/new/dfarc_3_source_code/
- Debian GNU/Linux
  http://wiki.debian.org/Games/Sponsors/Queue
- Fedora GNU/Linux
  http://fedoraproject.org/wiki/PackageMaintainers/UpdatingPackageHowTo
- OpenSUSE GNU/Linux
  tell Stefan about the latest official srpm
- ArchLinux GNU/Linux
  contact Petteri
- FreeBSD
  contact Stephen
- Ubuntu GNU/Linux (Debian merge request)
  contact shirish
- Linux Game Tome
  http://happypenguin.org/update?GNU%20Freedink
- Press...


Debian notes:
-------------

Check this for updates:
- /usr/share/doc/debian-policy/upgrading-checklist.txt.gz
- http://lintian.debian.org/full/pkg-games-devel@lists.alioth.debian.org.html#freedink-dfarc

# http://wiki.debian.org/Games/VCS
# http://wiki.debian.org/Games/VCS/git
git clone YOU@git.debian.org:/git/pkg-games/freedink-dfarc
cd freedink-dfarc
git checkout -b pristine-tar origin/pristine-tar
git checkout -b upstream origin/upstream

#export DEBEMAIL=xxx
#export EDITOR=emacs

git checkout master
git-import-orig --pristine-tar ../dfarc-$VERSION.tar.gz
# - Import debian/ from "upstream"
# - Fix stuff...
git commit -am "New upstream release - v$VERSION"
git-buildpackage --git-tag
git push origin master pristine-tar upstream
git push --tags
# http://mentors.debian.net/cgi-bin/maintainer-intro
dput mentors ../freedink-dfarc_$VERSION-1_*.changes


Fedora notes:
-------------

Do:
git pull
then check:
http://fedoraproject.org/wiki/PackageMaintainers/UpdatingPackageHowTo#Example
which is detailing this step.

See also:
https://admin.fedoraproject.org/pkgdb/acls/name/freedink-dfarc
http://pkgs.fedoraproject.org/gitweb/?p=freedink-dfarc.git
