How to make a spring release
============================


Preparation
-----------

1) Make sure to be on branch develop,
   on a commit that is on the main repo already.
2) check if all git submodules are up to date:
	git submodule foreach git pull
   commit if needed.
3) Create the release branch:
		git checkout -b release
		git push origin release
   From now on, EVERYTHING that should to be in the release,
   has to be commited on this branch.
4) Write & update the change-log (doc/changelog.txt)
5) Possibly add fixes
~) You may want to merge the release branch into develop from time to time:
		git checkout develop
		git merge release --no-ff

For every month of development the release (and feature-freeze) branch should kept about one week.
So if last release was 5 months ago, the release branch should stay for 5 weeks of feature-freeze / fixing bugs.

Release Time
------------

1) Merge the release branch into master:
		git checkout master
		git reset --hard origin/master
		git merge release --no-ff
2) Tag the release:
		export REL_VERS=96.0
		git tag -a -m "${REL_VERS} release [changed APIs: Lua, unitsync, AI]" ${REL_VERS}
   Make sure it looks correct:
		gitk master develop release &
3) Merge the release branch into develop:
		git checkout develop
		git fetch
		git stash
		# Do not forget this, somewhen later:
		#git stash pop
		git rebase origin/develop
		git merge release --no-ff
4) Tag the develop branch:
		git tag -a -m "dev version after the ${REL_VERS} release" ${REL_VERS}.1
5) POINT OF NO RETURN: Push to the main repo (and delete the release branch):
		git push --tags origin develop :release master
6) The Buildbot should automaticly start build the release on the buildslaves, wait for it until all builds are done,
   the OS-X buildslave will take about one hour or more!
7) Write the news post for the springrts.com frontpage, while waiting for the
   buildbot to compile the master branch.
8) Check if everything went fine on http://buildbot.springrts.com/waterfall and fetch these archives:
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/win32/spring_${REL_VERS}.exe
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/win32/spring_${REL_VERS}_portable.7z
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/osx64/spring_${REL_VERS}_MacOSX-10.6-SnowLeopard.zip
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/linux32/spring_${REL_VERS}_minimal-portable-linux32-static.7z
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/linux64/spring_${REL_VERS}_minimal-portable-linux64-static.7z
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/source/spring_${REL_VERS}_src.tar.gz
		wget http://springrts.com/dl/buildbot/default/master/${REL_VERS}/source/spring_${REL_VERS}_src.tar.lzma
9) you should now have these files:
	* spring_${REL_VERS}.exe
	* spring_${REL_VERS}_MacOSX-10.6-SnowLeopard.zip
	* spring_${REL_VERS}_portable.7z
	* spring_${REL_VERS}_src.tar.gz
	* spring_${REL_VERS}_src.tar.lzma
	Upload them to SF (replace USER with your SF account name):
		rsync --progress -h spring_${REL_VERS}* USER,springrts@frs.sourceforge.net:/home/frs/project/s/sp/springrts/springrts/spring-${REL_VERS}/
10) Post the news post.

11) After a week, set it as default version on the server:
	Ask a lobby admin to set the default version on the lobby server:
		http://springrts.com/wiki/Uberserver#set_spring_version
	Update download page by chaning the version templates on the Wiki.
		http://springrts.com/mediawiki/index.php?title=Template:EngineVersion:Stable:Major&action=edit
		http://springrts.com/mediawiki/index.php?title=Template:EngineVersion:Stable:Minor&action=edit
		http://springrts.com/mediawiki/index.php?title=Template:EngineVersion:Stable:ReleaseDate&action=edit
	Update the default downloads for each platform on SF.
		Installer .exe for Windows, .tar.gz for all other platforms.
		Do so through the file(s) properties on this page:
			https://sourceforge.net/projects/springrts/files/springrts/spring-${REL_VERS}/

