Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
800 stars 59 forks source link

Feature request, automatically infer semantic version #151

Open Fritiofhedstrom opened 11 months ago

Fritiofhedstrom commented 11 months ago

I'm currently using [semantic release](https://github.com/semantic-release/semantic-release, a utility that infers the version when publishing based on the commit history. However this is not perfect because you have to tag your commits with the right word in order to increment either major, minor or patch version for the next release.

Would it be possible instead to parse changes in the .api file and update the version variable based on the changes. I know this is probably not within the scope of this library, but it feels like it could be a very useful project for anyone who is using binary-compatibility-validator.

Does anyone know if such a tool allready exists? Are you interested in building it?

Fritiofhedstrom commented 11 months ago

Perhaps the apiDump task could return a value indicating whether the update was a major, minor, or patch. Or the plugin could introduce another file "api/.version" that could be parsed and written to with the new version when apiDump is run.