vivin / gradle-semantic-build-versioning

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

Option to force a new tag on the same commit which is already tagged #87

Closed javamuc closed 6 years ago

javamuc commented 6 years ago

My use case: We are working in sprints and have 10-ish projects that are developed in parallel and work together and we are using this plugin to handle the versioning of our projects, basically tagging the project with a sprint number.

Now for the projects that don't change during a sprint, I want to be able to still tag them. So I can check out later on, all projects using the same tag version, and I can be sure that the code can work together.

Would it be possible to add a new flag that allows me to force a tag on a commit that allready is tagged?

Cheers

javamuc commented 6 years ago

I forked the project and added a new property 'forceVersion' to achieve this. If you want to integrate this feature I can create a pull request.

https://github.com/javamuc/gradle-semantic-build-versioning

vivin commented 6 years ago

Sorry; just saw this.

The primary purpose of the plugin is to allow versioning, and the mechanism it uses is tags. Unless you were modifying the prefix of the tag, I'm not sure what utility there would be in tagging the same commit with tags representing different version numbers. Even modifying the prefix is a little problematic because that's usually the name of the project.

To ensure that the code is working together, rather than making sure they're all on the exact version, it is enough to follow semantic-versioning guidelines to ensure version compatibility.