OpenAPITools / sbt-openapi-generator

Other
27 stars 34 forks source link

Switch to sbt-dynver for versioning. #25

Closed jrouly closed 3 years ago

jrouly commented 3 years ago

Switch to using sbt-dynver for versioning.

Merged pull requests will publish snapshots automatically - for example, if you tag master at v5.0.0-beta2 before merging this, the next published version after merging would be something like 5.0.0-beta2+1-f7c1a0cb.

I also added a release trigger for the sbt github action, which will publish versioned artifacts whenever you create a new tag on master. So, the workflow for releasing new versions would simply be updating the dependency version, merging, and creating a github release.

I tested this out on my fork and it seems to work.

Per the dynver docs, you can replace the + with a - in snapshot version strings or force -SNAPSHOT for Sonatype compatibility, if either of those are interesting to you. Not sure what your plans for this repo are. Alternatively you can totally customize the version strings.

@jimschubert

jrouly commented 3 years ago

The only improvement I can think to offer here would be for @jimschubert to create a separate bintray repository for snapshots so that the latest version in the release repo is always a tagged release. But that's definitely not necessary.

jrouly commented 3 years ago

Looks like this relates to https://github.com/OpenAPITools/sbt-openapi-generator/issues/2. This could be a stop gap until full cross-repo automation is setup :shrug: open to input on direction.

jrouly commented 3 years ago

Bump @jimschubert not sure if you've had a chance to see this, know your notifications are hosed on this repo. Let me know what you think.

jimschubert commented 3 years ago

@jrouly oddly, I got the notification for your ping today...

I think this looks fine. I can go ahead and merge if there are no concerns. We definitely need to work out release vs snapshot. I've just had a lot of stuff going on in my personal life and not really any time for open source the last few months.

jrouly commented 3 years ago

@jimschubert absolutely no problem. Just figured I'd check in after the holidays in case you hadn't seen it, but no pressure.

If you're able, I'd say go ahead and merge - just make sure to tag master as v5.0.0-beta2 before merging. Once merged, an action should kick off and publish a snapshot artifact to the openapitools bintray.

jimschubert commented 3 years ago

Cool. I tagged current master. Let's see how this new approach works.

jrouly commented 3 years ago

Oh shoot @jimschubert you dropped the v from the start of the tag version, dynver didn't pick up your tag as a version. So it defaulted to creating the "first version" and produced an artifact versioned at 0.0.0+27-db312d3c.

Try creating a new tag+release (v5.0.0-beta2) on that same commit (10bc6558890bcbbe1a93566e3641bdbb2b9fe67b).

That should trigger a new build and produce a new snapshot for the latest commit (db312d3c093bfcc566ab11063612580502522a83).

jrouly commented 3 years ago

Looks like that worked, thanks a bunch for bearing with me through this. I'm excited to see 5.0.0 hit the shelves shortly, followed by snapshots.