#  This is NOT a shell script!

#
#  For version 0.7 (or any others), this file documents the methods
#  used by the developers to perform a release of the software.
#
#  If you're not a developer, then you can ignore this file.
#
#
VERSION=0
REVISION=7

# cvs -d :pserver:USER@cvs.freeradius.org:/source checkout -P -d freeradius-$(VERSION).$(REVISION) radiusd
cvs -d :pserver:USER@cvs.freeradius.org:/source checkout -P -d freeradius-0.7 radiusd

#
#  Do NOT type 'configure', 'make', or anything else.
#  We presume that 
#
# cd freeradius-$(VERSION).$(REVISION)
cd freeradius-0.7

#
#  Create a branch for the release
#
cvs tag -b branch_0_7

#
#  Mark all of the files to be for the branch
#
cvs update -rbranch_0_7

#
#  remove $$ surrounding the $Date ... $
#  add any last-minute notes
#
vi doc/ChangeLog

#
#  Commit it (to the branch)
#
cvs commit doc/ChangeLog

#
#  Change version/revision numbers
#
vi configure.in
vi redhat/freeradius.spec
vi suse/freeradius.spec
vi debian/changelog
vi debian/rules

#
#  Re-build and commit the configure script
#  Be sure this is autoconf 2.1x, not 2.5x
autoconf
cvs commit configure configure.in redhat/freeradius.spec suse/freeradius.spec debian/changelog debian/rules

#
#  tag the files for the release,
#  which is a POINT release of the main release.
#
#  i.e. We may way a 0.7.1 release later, which will
#  be tagged 'release_0_7_1' on the branch for 0.7,
#  which is called 'branch_0_7'.
#
# cvs tag release_$(VERSION)_$(REVISION)_0
cvs tag release_0_7_0

#
#  Delete the CVS directories.
#
rm -rf `find . -name CVS -print`

#
#  Delete any temporary files.
#
rm -f `find . -name "*~" -print`

#
#  Visually inspect the source, to be sure it's clean.
#

cd ..

# tar -zcf freeradius-$(VERSION).$(REVISION).tar.gz freeradius-$(VERSION).$(REVISION)
tar -zcf freeradius-0.7.tar.gz freeradius-0.7

#
#  Sign the archive.
#

#
#  These next steps presume you have an account on the main
#  FreeRADIUS web server.
#
scp freeradius-0.7.tar.gz ...freeradius.org

# move the archive to ftp 'pub/radius' directory

# move the previous version to the 'old' directory
mv freeradius-0.6.tar.gz old

#
#  delete the old soft link.
#
rm freeradius.tar.gz

#
#  link the new version to it's simple name
#
ln -s freeradius-0.7.tar.gz freeradius.tar.gz     

# go to the www directory

#
#  Ensure that the source archive on the web is updated.
# cvs update -APd radiusd

# edit index.html, and add in the release notes under 'news'
# edit getting.html, and update notes about current/old releases.

# on your work machine again,
rm -rf freeradius-0.7.tar.gz freeradius-0.7

# go to your working directory
# edit configure.in, to bump the version to '0.8-pre'
autoconf
cvs commit configure configure.in

cd doc

#
#  Add in notes about next release, in preparation for more change log notes.
#
vi ChangeLog
cvs commit ChangeLog
