vector-of-bool / vscode-gitflow

Gitflow integration for Visual Studio Code
89 stars 22 forks source link

Try to guess version numbers for new hotfixes and releases #16

Closed poohnix closed 6 years ago

poohnix commented 7 years ago

If you are using the "Semantic Versioning" scheme (http://semver.org/) these changes try to guess the next version you probably want to use for your hotfix or release.

This is done by getting the latest git tag for all branches. This tag gets the "tagPrefix()" stripped off and is then used to build the new version number. For releases the MINOR number is increased and the PATCH number is set to zero, for hotfixes simply the PATCH number is increased.

This new version number is then put as a default "value" and as the "placeHolder" into the InputBox for the release or hotfix name.

poohnix commented 7 years ago

Initially I forgot to handle the corner case of a new git project where no tag exists yet. I fixed this with these two commits: https://github.com/vector-of-bool/vscode-gitflow/pull/16/commits/d81d40fb261212cab029fc82033fe79fd075e254 https://github.com/vector-of-bool/vscode-gitflow/pull/16/commits/3db50c86569cd1ea574ed54ded35f1e14c4d3938

vector-of-bool commented 6 years ago

Sorry about the delay. Thanks for the PR!