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

  1. Defining the version number of the release.

  2. Creation of a version bump branch bump-version

    C:\release-bot\foxbms-2>git checkout -b bump-version
    
  3. 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"
    
  4. Merge the branch back to master branch and remove the version bumping branch

    C:\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
    
  5. Tag the master branch with v1.0.0:

    C:\release-bot\foxbms-2>git tag -a v1.0.0 -m "v1.0.0"
    
  6. Make the master branch a development branch again (note the reverted order of from and to: --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
    
  7. Push all this work:

    C:\release-bot\foxbms-2>git push origin master --follow-tags
    

5.2. Creation of the release branch

  1. 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
    
  2. Run script to remove confidential and non-releasable files and information.

  3. 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"
    
  4. 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
    
  5. Clean the repository from all generated files:

    C:\release-bot\foxbms-2>git clean -xdf
    

5.3. Publication of the release branch

  1. 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"
    
  2. Remove all files from the current checkout:

    C:\release-bot\foxbms-2-publishing-mirror>git rm -r "*"
    
  3. 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
    
  4. 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
    
  5. 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
    
  6. Merge the gh-release-v1.0.0 branch to the master branch and create an annotated tag v1.0.0 on master 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
    
  7. Push to the publishing repository:

    C:\release-bot\foxbms-2-publishing-mirror>git push origin master --follow-tags
    
  8. 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