Version handling with Flow
Version numbers play a crucial role in branching models. Flow is a command-line developer tool to maintain software projects compliant with a branching model. Additionally, Flow offers robust version handling and ensures that version numbers are always in compliance with the model.
The diagrams presented only display relevant information related to the topic at hand. Additional details, including tags, branches, and commits that occur in the process, are omitted.
Validation and compliance
Flow ensures all version files are present and valid. For example, the development major or minor version must be greater than the staging version. Flow not only verifies versions but also reports irregularities and offers to correct them.
1 | A prod [0.0.0] |
1 | A prod [0.0.0] |
Similarly, the (unreleased) staging version must be greater than the production version and lower than the development version. Flow can fix this as well, including missing version files and invalid version formats.
The release process
During the general release process, from development to staging to production, Flow preserves the source version value. After the first release candidate is created, Flow automatically increments the minor version on the development branch for future releases.
1 | A prod [0.0.0] |
1 | A prod [0.0.0] |
1 | A-----------F prod, staging [0.1.0] |
When the development branch is released multiple times without releasing the staging branch, versions on the development and staging branches are preserved. However, the release candidate number increments. Read more about handling changelog with Flow.
Hotfixing
Hotfixes are released into the production branch using a non-fast-forward merge. Flow automatically increments the patch version number, removes the hotfix branch, and prompts for a changelog entry.
1 | C---D---E hotfix [0.1.0] |
1 | C---D---E---F hotfix [0.1.1] |
1 | C---D---E---F hotfix [0.1.1] |
The hotfix version is not incremented until it is merged. This supports multiple parallel hotfixes. Hotfixes are also released into separate production branches corresponding to their major version. Read more about merging branches with Flow.
Try Flow today
Flow’s version handling capabilities make it easy to track your project’s progress and ensure that your version numbers are always in compliance.
If you’re interested, feel free to download Flow from GitHub. Check out the tutorial for an easy way to get started. Your feedback is welcome as well as suggestions and contribution.