nebula-plugins / nebula-release-plugin

Release opinions based around gradle-git
Apache License 2.0
220 stars 56 forks source link

Using a different release branch naming convention #231

Open sourcedelica opened 1 year ago

sourcedelica commented 1 year ago

I'm porting an existing set of projects to use nebula-release-plugin. Historically their release branch naming convention is release-x.y, for example release-3.2. The nebulaRelease extension allows you to set releaseBranchPatterns and that is helpful in it won't allow you to release from other branch names. However, setting releaseBranchPatterns does not change the list of branch patterns in NetflixOssStrategies.getScopes. Those strategies determine the default handling of version increments for snapshot, final, etc. The README.md talks about this:

We attempt to pick up on the fact that you're on certain release branches.

Examples:

On release/1.x - The plugin will default to versioning you 1.0.0-SNAPSHOT On 3.x - The plugin will default to versioning you 3.0.0-SNAPSHOT On 4.2.x - The plugin will default to versioning you 4.2.0-SNAPSHOT

The default versioning only works if you use branch names ending with .x.

Is there way to use our legacy branch naming convention and get the versioning behavior of the ReleasePlugin? I supposed I could start with BaseReleasePlugin and configure new strategies that use our legacy branch naming, but there is a huge gap between the base plugin and ReleasePlugin. I really want all of the goodness in ReleasePlugin just with this little tweak :)

Either way, thanks! I've been testing the plugin and checking out the code over the last few days and it's really impressive. I'm thankful that it exists.