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

Use sbt-sonatype bundle release to speed up publishing #59

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

tpolecat
Copy link
Contributor

@tpolecat tpolecat commented Sep 6, 2019

This resolves #58 in principle but despite changing the sbt-sonatype version to 3.4 libraryDependencies still shows 2.6 and the sonatypePublishToBundle key is not found. I am completely baffled. Any ideas?

Also unclear how to test this.

@ChristopherDavenport
Copy link
Contributor

@tpolecat
Copy link
Contributor Author

tpolecat commented Sep 6, 2019

hell

Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution! I am very excited to try out bundle releases :D

@@ -89,7 +89,7 @@ object CiReleasePlugin extends AutoPlugin {
} else {
println("Tag push detected, publishing a stable release")
sys.env.getOrElse("CI_RELEASE", "+publishSigned") ::
Copy link
Member

Choose a reason for hiding this comment

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

Could this be necessary as well? I can't tell from the sbt-sonatype readme, but my intuition is that the speedups are gained from not running publishSigned (which is usually bottleneck).

Suggested change
sys.env.getOrElse("CI_RELEASE", "+publishSigned") ::
sys.env.getOrElse("CI_RELEASE", "+publishLocalSigned") ::

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My reading was that publishSigned goes into an archive thing locally if you set publishTo := sonatypePublishToBundle.value and then it's all shipped atomically when you do sonatypeBundleRelease. Maybe @xerial can clarify?

Copy link
Member

Choose a reason for hiding this comment

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

Thank makes sense, let's give it a try and see it how fares!

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it failed with

[error] java.io.IOException: Supplied file /home/travis/build/olafurpg/sbt-ci-release/target/sonatype-staging/sbt-ci-release-1.3.0 is a not an existing directory!

The local directory was

info] 	published sbt-ci-release to /home/travis/build/olafurpg/sbt-ci-release/target/sonatype-staging/plugin-1.3.0/com/geirsson/sbt-ci-release_2.12_1.0/1.3.0/sbt-ci-release-1.3.0-javadoc.jar.asc

It looks like sonatypePublishToBundle is using the project's id and sonatypeBundleRelease is using the moduleName 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:-\

Copy link

Choose a reason for hiding this comment

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

With publishTo := sonatypePublishToBundle.value setting, publishSigned task will create a local staging folder.

It's a bit confusing, but publishLocalSigned task is for storing artifacts into ~/.ivy2/ folder.

@olafurpg olafurpg changed the title bundle publish Use sbt-sonatype bundle release to speed up publishing Sep 6, 2019
Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -89,7 +89,7 @@ object CiReleasePlugin extends AutoPlugin {
} else {
println("Tag push detected, publishing a stable release")
sys.env.getOrElse("CI_RELEASE", "+publishSigned") ::
Copy link
Member

Choose a reason for hiding this comment

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

Thank makes sense, let's give it a try and see it how fares!

@olafurpg olafurpg marked this pull request as ready for review September 6, 2019 19:15
@olafurpg olafurpg merged commit 0f960cf into sbt:master Sep 6, 2019
@tpolecat tpolecat deleted the bundle-publish branch September 6, 2019 19:40
@tpolecat
Copy link
Contributor Author

tpolecat commented Sep 6, 2019

There's a new version already. Investigating.

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.

Sonatype Bundle Release
4 participants