Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Manage version automatically at finish time #229

Closed
baby-gnu opened this Issue · 2 comments

1 participant

@baby-gnu

Hello,

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

Regards.

@baby-gnu

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

I missed the issue #129 partly implemented by #186

@baby-gnu baby-gnu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.