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

Prerequisite
-----------

1) Create at least two release candidates for testing and wait at least a week for feedback.
https://springrts.com/wiki/Download_Testing

2) Check if the bug tracker contains no cricitical bugs, especially
https://springrts.com/mantis/roadmap_page.php

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) Write & update the change-log (doc/changelog.txt)
4) Possibly add fixes


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

1) Merge the develop branch into master:
		git checkout master
		git reset --hard origin/master
		git merge develop --no-ff
2) Tag the release:
		export REL_VERS=103.0
		git tag -a -m "${REL_VERS} release [changed APIs: Lua, unitsync, AI]" ${REL_VERS}
3) switch back your local branch to develop so you don't commit into the master branch by accident:
		git checkout develop
4) Tag the develop branch:
		git tag -a -m "dev version after the ${REL_VERS} release" ${REL_VERS}.1
5) Make sure it looks correct:
		gitk master develop
6) POINT OF NO RETURN: Push to the main repo:
		git push --tags origin develop master
7) 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!
8) Write the news post for the springrts.com frontpage, while waiting for the
   buildbot to compile the master branch.
9) Check if everything went fine on http://buildbot.springrts.com/waterfall and fetch these archives:
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/win32/spring_${REL_VERS}_win32.exe
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/win32/spring_${REL_VERS}_win32_portable.7z
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/win32/spring_${REL_VERS}_win32-minimal-portable.7z
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/win64/spring_${REL_VERS}_win64-minimal-portable.7z
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/osx64/spring_${REL_VERS}_MacOSX-10.6-SnowLeopard.zip
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/linux32/spring_${REL_VERS}_minimal-portable-linux32-static.7z
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/linux64/spring_${REL_VERS}_minimal-portable-linux64-static.7z
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/source/spring_${REL_VERS}_src.tar.gz
		wget https://springrts.com/dl/buildbot/default/master/${REL_VERS}/source/spring_${REL_VERS}_src.tar.lzma
10) 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}/
11) Post the news post.
12) add the release to mantis: ( ${REL_VERS}+git and ${REL_VERS + 1}) and mark old stable versions as obsolete.
	https://springrts.com/mantis/manage_proj_page.php
13) After a week, set it as default version on the server:
	Ask a lobby admin to set the default version on the lobby server:
		https://springrts.com/wiki/Uberserver#set_spring_version
	Update download page by chaning the version templates on the Wiki.
		https://springrts.com/mediawiki/index.php?title=Template:EngineVersion:Stable:Major&action=edit
		https://springrts.com/mediawiki/index.php?title=Template:EngineVersion:Stable:Minor&action=edit
		https://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}/


Windows reference
-----------------
git checkout master
git reset --hard origin/master
git merge develop --no-ff
SET REL_VERS=103.0
git tag -a -m "%REL_VERS% release" %REL_VERS%
git checkout develop
git tag -a -m "dev version after the %REL_VERS% release" %REL_VERS%.1
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/win32/spring_%REL_VERS%_win32.exe
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/win32/spring_%REL_VERS%_win32-minimal-portable.7z
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/win64/spring_%REL_VERS%_win64-minimal-portable.7z
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/linux32/spring_%REL_VERS%_minimal-portable-linux32-static.7z
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/linux64/spring_%REL_VERS%_minimal-portable-linux64-static.7z
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/source/spring_%REL_VERS%_src.tar.gz
wget https://springrts.com/dl/buildbot/default/master/%REL_VERS%/source/spring_%REL_VERS%_src.tar.lzma

rsync --progress -h spring_%REL_VERS%* ashdnazg,springrts@frs.sourceforge.net:/home/frs/project/s/sp/springrts/springrts/spring-%REL_VERS%/
