5. Public Release Process
This description is for documenting purposes only, so that others know how we,
the Team, create public releases.
Releases are created from commits of the master
branch of an Fraunhofer
internal git repository.
A release is assembled by running the described procedure after the master
branch has been bumped to a version, which identifier matches the regular
expression \d+\.\d+\.\d+
(the internal development version number is always x.y.z
, except for the
commit that bumps the version to a releasable version).
Note
This description uses two different directories:
C:\release-bot\foxbms-2
: local checkout of the internal repository.C:\release-bot\foxbms-2-publishing-mirror
: local checkout of the internal repository that is synced to https://github.com/foxBMS/foxbms-2.
The release is internally created by the The foxBMS ReleaseBot
and these
steps are automated.
The git configuration of the The foxBMS ReleaseBot
is
C:\release-bot\foxbms-2-publishing-mirror>git config user.name "The foxBMS ReleaseBot"
C:\release-bot\foxbms-2-publishing-mirror>git config user.mail "info@foxbms.org"
For this documentation we assume that the version to be created and released
is 1.0.0
.
5.1. Defining release status of repository
Defining the version number of the release.
Creation of a version bump branch
bump-version
C:\release-bot\foxbms-2>git checkout -b bump-version
Bump the version number in all relevant files and commit the changes to the new branch:
C:\release-bot\foxbms-2>tools\utils\cmd\run-python-script.bat tools\utils\update_version.py --from x.y.z --to 1.0.0 C:\release-bot\foxbms-2>tools\utils\cmd\run-python-script.bat tools\utils\update_doxygen_header.py C:\release-bot\foxbms-2>git add . C:\release-bot\foxbms-2>git commit -m "bump version to v1.0.0" C:\release-bot\foxbms-2>git tag -a v1.0.0-version-bump -m "bump version to v1.0.0"
Merge the branch back to
master
branch and remove the version bumping branchC:\release-bot\foxbms-2>git checkout master C:\release-bot\foxbms-2>git merge bump-version C:\release-bot\foxbms-2>git branch -D bump-version
Tag the
master
branch withv1.0.0
:C:\release-bot\foxbms-2>git tag -a v1.0.0 -m "v1.0.0"
Make the
master
branch a development branch again (note the reverted order offrom
andto
:--from 1.0.0 --to x.y.z
):C:\release-bot\foxbms-2>tools\utils\cmd\run-python-script.bat tools\utils\update_version.py --from 1.0.0 --to x.y.z
Push all this work:
C:\release-bot\foxbms-2>git push origin master --follow-tags
5.2. Creation of the release branch
Creation of the release branch at the created version tag
v1.0.0
:C:\release-bot\foxbms-2>git checkout v1.0.0 C:\release-bot\foxbms-2>git checkout -b release-v1.0.0
Run script to remove confidential and non-releasable files and information.
Commit all changes to the release branch
release-v1.0.0
and tag this commit as release:C:\release-bot\foxbms-2>git add . C:\release-bot\foxbms-2>git commit -m "branch for GitHub release version 1.0.0" C:\release-bot\foxbms-2>git tag -a gh-1.0.0 -m "gh-1.0.0"
Make a clean build to make sure everything works as expected:
C:\release-bot\foxbms-2>waf configure C:\release-bot\foxbms-2>waf build_all
Clean the repository from all generated files:
C:\release-bot\foxbms-2>git clean -xdf
5.3. Publication of the release branch
Create release branch in the publishing mirror and check it out:
C:\release-bot\foxbms-2-publishing-mirror>git checkout -b gh-release-v1.0.0 C:\release-bot\foxbms-2-publishing-mirror>git commit -m "update branch for GitHub release version 1.0.0"
Remove all files from the current checkout:
C:\release-bot\foxbms-2-publishing-mirror>git rm -r "*"
Copy files from release branch in the internal repository to the release branch of the publishing repository and add them:
C:\release-bot\foxbms-2-publishing-mirror>xcopy C:\release-bot\foxbms-2 . /s /e C:\release-bot\foxbms-2-publishing-mirror>git add . -f C:\release-bot\foxbms-2-publishing-mirror>git commit -F docs\general\commit-msgs\release-v1.0.0.txt
Create a dummy tag (annotated or not does not make a difference here) and make sure everything works as expected (no problems are expected to happen):
C:\release-bot\foxbms-2-publishing-mirror>git tag v1.0.0 C:\release-bot\foxbms-2-publishing-mirror>waf configure C:\release-bot\foxbms-2-publishing-mirror>waf build_all
Delete the temporary tag
v1.0.0
:C:\release-bot\foxbms-2-publishing-mirror>git checkout master C:\release-bot\foxbms-2-publishing-mirror>git tag -d v1.0.0
Merge the
gh-release-v1.0.0
branch to themaster
branch and create an annotated tagv1.0.0
onmaster
branch:C:\release-bot\foxbms-2-publishing-mirror>git merge gh-release-v1.0.0 C:\release-bot\foxbms-2-publishing-mirror>git branch -D gh-release-v1.0.0
Push to the publishing repository:
C:\release-bot\foxbms-2-publishing-mirror>git push origin master --follow-tags
The
master
branch of the publishing mirror is automatically synced to https://github.com/foxBMS/foxbms-2.
5.4. Finishing the release
After that process, we
create GitHub release,
update the documentation on https://docs.foxbms.org and
post a news entry on the website https://foxbms.org.