How To Prepare a Release
================

WARNING: This procedure will delete many files from the Sofa directory, it is best not to use it on your regular development version but on a separate (fresh) checkout

NOTE: These commands were only tested using bash on Linux or Mac OS.

NOTE: If you are in a hurry and pray to the gods, then simply do:
    grep '^\$' how-to-prepare-a-release.txt | colrm 1 2 | bash


1: Set the VERSION variable (so that you can copy/paste code lines without manually replacing it)

$ VERSION="1.0 RC 1" # Human-readable version
$ VERSIONID=1.0-rc1 # No spaces, to be used in filenames

2: Get the latest SVN version

$ svn co svn+ssh://scm.gforge.inria.fr/svn/sofa-dev/trunk/Sofa
$ cd Sofa

3: Set the correct version in text files (readme.txt, Authors.txt, LICENCE.txt, framework/copyright.txt, modules/copyright.txt, applications/copyright.txt, applications/plugins/copyright.txt)

4: Run scripts to update all svn properties and copyright headers

$ ./scripts/svn-setprops.sh
$ ./scripts/set-headers.sh

5: If any changes were made, commit them

$ svn commit -m "Preparing release $VERSION"

6: Remove all flagged codes and examples

$ ./scripts/filter-all.sh --release --clean

NOTE: After this point do not commit from this directory anymore !

7: Change "PROJECT_NUMBER" in Doxyfile.in to the released version

$ sed -i.bak 's/SVN/"'"$VERSION"'"/' Doxyfile.in

8: Remove all the temporary files that were not in SVN

$ svn status --no-ignore --non-interactive | grep '^[I?]' | colrm 1 8 | sed 's/ /\ /g' | xargs rm -rf

9: Create the archives (they will be placed on the parent directory)

$ ./scripts/make-archives.sh $VERSIONID

10: Extract them in an empty directory and TEST TEST TEST !

