Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to sbt-dynver for versioning. #25

Merged
merged 2 commits into from
Jan 23, 2021
Merged

Conversation

jrouly
Copy link
Contributor

@jrouly jrouly commented Nov 27, 2020

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 jrouly mentioned this pull request Nov 27, 2020

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should cause github to fetch tags during checkout.

@jrouly
Copy link
Contributor Author

jrouly commented Nov 27, 2020

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
Copy link
Contributor Author

jrouly commented Dec 5, 2020

Looks like this relates to #2. This could be a stop gap until full cross-repo automation is setup 🤷 open to input on direction.

@jrouly
Copy link
Contributor Author

jrouly commented Jan 19, 2021

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
Copy link
Member

@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
Copy link
Contributor Author

jrouly commented Jan 21, 2021

@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
Copy link
Member

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

@jimschubert jimschubert merged commit db312d3 into OpenAPITools:master Jan 23, 2021
@jrouly
Copy link
Contributor Author

jrouly commented Jan 23, 2021

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 (10bc655).

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

@jrouly
Copy link
Contributor Author

jrouly commented Jan 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants