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

Fix release command for snapshots #52

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

armanbilge
Copy link
Contributor

This PR creates a sonatypeBundleReleaseIfRelevant task which skips the sonatypeBundleRelease task when releasing a snapshot. This is because snapshots are uploaded directly by the publishIfRelevant task and the bundling step is unnecessary (and will fail).

SBT still bewilders me so apologies for any blunders or bad code style ...

@djspiewak
Copy link
Owner

Ahhhh! Nice catch. I didn't even realize this was an issue.

@armanbilge
Copy link
Contributor Author

It was easy to miss, because with the plugin's defaults I think it's impossible to publish a snapshot via GitHub actions (publishing snapshots locally is possible, but presumably nobody has tried to push these to sonatype).

I think the build failure is related to sbt/sbt#6363 which is fixed in the latest SBT. So after merging in main, CI should hopefully pass now.

@djspiewak djspiewak merged commit 2104597 into djspiewak:main Jul 7, 2021
djspiewak added a commit that referenced this pull request Aug 25, 2021
@djspiewak
Copy link
Owner

@armanbilge I had to revert this because sonatypeBundleRelease is actually a command rather than a task, so it can't be called in this fashion. I didn't notice it until attempting to release sbt-spiewak itself. I'm actually not 100% certain how to encode a dynamic task as a command. I'm sure it's possible, I just don't know exactly how.

@armanbilge
Copy link
Contributor Author

armanbilge commented Aug 25, 2021

Shoot, sorry about that. I've been using this in https://github.com/armanbilge/schrodinger/ without problem?

Edit: nope, maybe not actually, never released with it enabled, just snapshots. Sorry again.

@djspiewak
Copy link
Owner

No worries! It should still be possible to do this, just has to be encoded as a command, which is about 100x weirder than a task.

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.

None yet

2 participants