lightbend / genjavadoc

A compiler plugin for generating doc’able Java source from Scala source
Other
58 stars 32 forks source link

Update release instructions for back-publishing #333

Closed SethTisue closed 1 year ago

SethTisue commented 1 year ago

RELEASING.md says that if you're back publishing for a new Scala version you should publish from your laptop.

But it appears to me that the tag-based publishing should actually work. The back-publishing instructions ask you to push a tag, and I noticed that that's resulting in a release job, e.g.

https://github.com/lightbend/genjavadoc/actions/runs/5160879521/jobs/9297389557

2023-06-03 00:52:37.563Z error [SonatypeClient] [promote] Failed  - (SonatypeClient.scala:178)
2023-06-03 00:52:37.564Z error [SonatypeClient] Activity name:release, started:2023-06-03T00:52:30.508Z  - (SonatypeClient.scala:466)
2023-06-03 00:52:37.565Z error [SonatypeClient]     Failed: RepositoryWritePolicy, failureMessage:Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/typesafe/genjavadoc/genjavadoc-plugin_2.12.13/0.18_2.12.18/genjavadoc-plugin_2.12.13-0.18_2.12.18.jar'  - (SonatypeClient.scala:384)
2023-06-03 00:52:37.567Z error [Sonatype] [STAGE_FAILURE] Failed to promote the repository.  - (Sonatype.scala:440)

so I think what happened is that the publishing from my laptop completed first, and then the tag-based publishing only failed because I'd already published

🤦 😆

SethTisue commented 1 year ago

Oh, though, the tag based publishing has a bad artifact name in it: /com/typesafe/genjavadoc/genjavadoc-plugin_2.12.13/0.18_2.12.18/genjavadoc-plugin_2.12.13-0.18_2.12.18.jar

Could I fix that? Or maybe it's not worth fixing and I should just change the instructions to either not involve pushing a tag at all, or for the tag to somehow not publish? 🤔

SethTisue commented 1 year ago

and if the artifact name is wrong, why was it a duplicate? 🙀

SethTisue commented 1 year ago

https://github.com/sbt/sbt-ci-release/issues/102 has information on how one is expected to do this with sbt-ci-release

SethTisue commented 1 year ago

rather than tackle this properly, I pushed 90404c6a26fc07ddba056a16c2f18b8c55952c2c which just updates the instructions to summarize the current situation, including linking to this ticket