Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Manage version automatically at finish time #229

baby-gnu opened this Issue Jul 4, 2012 · 2 comments


None yet
1 participant

baby-gnu commented Jul 4, 2012


I wrote a little shell script helper to increment dotted decimal version number.

I think git-flow can use something similar:

  • this will permit to have several hotfixes branches in parallel (c.f. #3), named according to bug numbers (I name my hotfixes branch according to their ID like hotfix/228)
  • the <release> argument became a -n <name> option
  • the optional <base> argument remains

The version number can be calculated at start time for a new release and at finish for every branches (even release, thus I can name my release branch like I want ;-)), getting the previous version number with git describe and incrementing it according to some policies, for example:

  • git flow release start or git flow release finish => increment_version --minor $(git describe)
  • git flow hotfix finish => increment_version --revision $(git describe)

The final version number could be specify by hand to by pass automatic calculation, for example, if automatic policy for release is to increment the minor version number, I can increment the major one by hand with:

git flow release -r 2.3.0

Anothe possibility is to pass an option to the version command:

git flow release --version major

The command to increment the version number could even be configurable, something like:

gitflow.release.increment_version=git flow version --minor
gitflow.hotfix.increment_version=git flow version --revision


baby-gnu commented Jul 4, 2012

The example with git flow version is not correct since it's already used by gitflow itsel to display its own version number

baby-gnu commented Jul 4, 2012

I missed the issue #129 partly implemented by #186

@baby-gnu baby-gnu closed this Jul 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment