Closed JanBessai closed 4 years ago
Any news on this?
I believe this is an issue that I fixed in master but didn't advertise. You could use it by depending on 2.1.1+4-9d76569a. Then, doing releaseEarly
followed by sonatypeBundleRelease
should release the project successfully with the new sbt-sonatpye bundled upload, which is much faster.
With version 2.1.1+4-9d76569a
and sbt +releaseEarly +sonatypeBundleRelease
I get
java.lang.RuntimeException: Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.
even though my build.sbt specifies to publish using sonatype.
The full travis log is also available.
Yes, this is a bug that needs to be fixed, you can work around that by passing the empty system properties for now when you need to release. Otherwise if you could fix this bug, I would be grateful
It worked! I had to make some minor adjustments to my CI-config, but overall the issue seems to be gone. Specifically:
echo $PGP_PASS | gpg --passphrase-fd 0 --batch --yes --import travis/local.secring.asc
as a step before the sbt call.
It imports the private key into the system's native gpg client, which was previously handled by Java's BouncyCastle implementation. A minor pitfall is that the environment variable name PGP_PASS
is taken from the sbt-release-early tutorial and different from the sbt-pgp tutorial.
sbt +releaseEarly sonatypeBundleRelease
with +releaseEarly
and no plus for sonatypeBundleRelease
.
Otherwise sonatypeBundleRelease
fails because it tries to re-upload the cross build versions which already exist. The failure message for this is not the most helpful:
Failed: RepositoryWritePolicy, failureMessage:Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/combinators/shapeless-feat_2.13/0.2.3+37-1cecf7fe/shapeless-feat_2.13-0.2.3+37-1cecf7fe-javadoc.jar'
sbt-sonatype
for this. I had this issue when I tried to make a release on Friday evening (Central European Time, UTC+01:00), which might be a high-traffic time for automated releases.Thanks for that thorough comment @JanBessai If you could update the wiki (which has open access) with that information when you have some time I'd appreciate it.
Using sbt-release-early with sbt 1.3.0 and Sonatype creates one staging profile per artifact instead of propagating them to the same profile. Here is an example failing with 1.3.0 and proof that things work with 1.2.8. Here is the relevant section of the build log:
In the failing example, you can see that there are 8 artifacts and 8 options for staging repositories.
I'd guess that something is running in parallel in 1.3.0, which was sequentially previously. I did not test against 1.3.2 (yet), because its changelog seemed to be unrelated.
This is unrelated to #30 because there is only one project. It is also different from #32, because there are 3 Scala versions in my project and 8 (number of things to upload) staging repositories.