Git Flow Release Workflow

This documentation outlines the process for preparing a release version using the Git Flow workflow.

Overview

Git Flow is a branching model that defines a strict branching structure designed around project releases. The release workflow helps maintain clean, organized code while preparing for production deployments.

Release Preparation Steps

  1. Start a Release Branch

     git flow release start <version>
    

    Creates a new release branch from develop. Use semantic versioning (e.g., 1.2.0).

  2. Prepare Release Changes
    • Run bump_version.py script

    OR

    • Update version numbers in the following files
      • pyproject.toml (lines 3 and 17)
      • src/brushsetmaker.dist-info/METADATA (line 6)
      • src/brushsetmaker/__init__.py (line 2)
      • git add .
      • git commit -m 'bump version to <version>'
  3. Finish the Release

     git flow release finish <version>
    

    This will:

    • Merge the release branch into main
    • Tag the release with the version number
    • Merge back into develop
    • Delete the release branch
  4. Push Changes

     git push origin main
     git push origin develop
     git push --tags
    
  5. Build the Release Package

     make build
     make package
    

    This will:

    • Generate a BrushsetMaker.app in build/brushsetmaker/macos/app/
    • Generate a BrushsetMaker.zip in build/brushsetmaker/macos/app/
    • Generate a BrushsetMaker-<version>.dmg in dist/
  6. Create Release on Github
    • Label the release as the version number
    • Fill out the release notes with the changelog
    • Upload the .dmg and the .zip to the release assets
    • Rename the .zip to BrushsetMaker-<version>.zip

Best Practices

  • Keep release branches short-lived (hours to days, not weeks)
  • Only fix critical bugs on release branches
  • Never start new features on a release branch
  • Always tag releases with semantic version numbers
  • Update documentation before finishing the release