Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Fix closing maven central staging repo request to allow skipping closing #35

Merged
merged 1 commit into from
Mar 5, 2018

Conversation

lukaszwawrzyk
Copy link
Contributor

I haven't tested if this is a bug, but it seems like one.
As stated in bintray api documentation here,

By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off and release the version manually. This is achieved by passing 0 in the 'close' field of the JSON passed to the call.

So it seems that in order to close the repo we need to pass "1" or nothing, and to leave it open, we should pass "0" explicitly. Currently, the code seems to pass "1" if method is called with close = true, and pass null (?) if method is called with close = false. Which would mean it will be closed regardless of what is passed.
I changed the code to be explicit about the close and always send either "1" or "0".

So please correct me if this is wrong. If this is correct, I would like to ask for a possibly quick merge and release. After this I am planning to update sbt-bintray plugin to expose this closing via a setting.
Thanks.

@lukaszwawrzyk lukaszwawrzyk changed the title Fix closing maven central staging repo request to actually allow closing Fix closing maven central staging repo request to allow skipping closing Feb 27, 2018
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

hi @lukaszwawrzyk! sorry for making you wait so long for this review, I've been hung up on a long task these days and didn't have a chance to slow down and read what you said.

I agree with your assessment. this is good to go, and I'll merge it now, and release either later today or tomorrow.

btw from my reading of the code if close were ever false it would actually throw at runtime: https://github.com/json4s/json4s/blob/v3.4.2/native/src/main/scala/org/json4s/native/JsonMethods.scala#L38

@dwijnand dwijnand merged commit 49c337b into sbt:master Mar 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants