The Release Process

This page describes the release process for OSD Neo2. The process may look over-engineered for a small project like this one, but I’m used to it from my other projects like PyInstaller.

Preparation

  1. Ensure you have write access to the repository at GitLab.

  2. Install the required helper-tools:

    pip install --user -U zest.releaser
    

Full Release Process

Prepare for Release

  1. Prepare (see above).

  2. Implement and close all issues and pull requests in a specific milestone.

  3. Ensure everything relevant is committed and tested. git stash your local changes which should not go into the release.

  4. Continuous integration tests should pass (if we have these tests)

Main Release Process

  1. Set a shell variable to be able to copy-and-paste the remaining snippets, e.g.:

    version=3.1
    
  2. Create the release branch:

    git checkout -b release/$version
    
  3. Update versions in Source-code, Changelog, etc.:

    prerelease # zest.releaser command
    

    This will

    • ask you a few questions - required version, …

    • remove .devN from the version string

    • update date and version in NEWS.rst

  1. Update ``NEWS.rst``:

    Where to look for possible changes? You can look in pull requests, issues, commits, mailing list or even OSD Neo2 cli options (new/removed options).

    1. Check if the files are valid reStructuredText by running:

      rst2html NEWS.rst > /tmp/NEWS.html
      xdg-open /tmp/NEWS.html  # opens file in your web-browser
      
    2. If everything is fine, commit:

      git commit -m "Update NEWS.rst for release $version" NEWS.rst
      
  1. Adjust whatever else is required for the release now.

  2. Complete the release:

    1. Merge into branch releases:

      git checkout releases
      git merge --no-ff -m "Release $version." release/$version
      
    2. In case of a merge-conflict, resolve it using:

      git gui # In the context-menu select "Use Local Version"
      git commit -m "Finished release $version."
      
    1. Tag and sign the release (we are using prefix v):

      git tag -s v$version -m "|OSDNeo2| $version"
      
  3. Do not run the zest.releaser script release. It will only perform stuff we do not need for this project.

  4. Push the changes to GitLab:

    git push --follow-tags origin releases
    

    This will automatically create a new release and release archives under https://gitlab.com/htgoebel/OSD-Neo2/tags

  5. Edit the release on GitLab:

    1. Go to the |OSDNeo2| tags page

    2. Edit the latest tag details.

    3. Copy there the changelog for the current release. This should look like this one Mind to keep the links to the release archives and the different markup (which is markdown).

  1. Update the website:

    • Update version in conf.py.

    • Update the link to the release archive in index.rst.

    • Commit and push push the updated website:

      git add conf.py
      git commit -m "Bump version to $version"
      git push
      
  2. Announce the new release on:

Post-Release Steps

Now we are going to perform some post-release steps:

  1. Checkout the release-branch and forward it to releases:

    git checkout release/$version releases
    git reset --hard releases
    
  1. Run the release script postrelease:

    postrelease # zest.releaser command
    

    This will

    • increment version string for a new release: 3.0 -> 3.1.dev0

    • prepare NEWS.rst for the next release.

  2. Merge into branch develop:

    git checkout main
    git merge --no-ff -m "Finish releasing $version." release/$version
    
  3. Check the diffs: it should only be version related stuff:

    git diff origin/main
    
  4. Delete the local release branch and push the changes:

    git branch -d release/$version git push –follow-tags origin main releases