vivin / gradle-semantic-build-versioning

Gradle plugin to generate version-numbers and tags using semantic versioning
MIT License
85 stars 32 forks source link

Tagging considers the previous tags only on current branch and not complete git tree #100

Closed rustycl0ck closed 5 years ago

rustycl0ck commented 6 years ago

While running the tag task, it considers (for filtering) the tags only on current branch. I have two branches on my project. Both have the same gradle and plugin settings. Tags on branch-1: v0.1.0-alpha.1, v0.1.0-alpha.2, v0.1.0-alpha.3 Then created branch-2 and someone else worked there. Tags on branch-2: v0.1.0-alpha.4, v0.1.0-alpha.5

Now when I do gradle tag on branch-1 it throws an error that v0.1.0-alpha.4 already exists while it should tag it with v0.1.0-alpha.6

vivin commented 5 years ago

@rustycl0ck As a best practice, I probably wouldn't create release tags on feature branches. You should only be doing that on master (i.e., designate a single branch that you use to tag and deploy release versions). The plugin limits itself to the current branch when looking for tags -- it does not consider any other branches (that would be confusing -- what happens if you delete that branch?).