-
Notifications
You must be signed in to change notification settings - Fork 77
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
is there a standard/recommended way to back-publish? #102
Comments
It's a good question 🤔 I would recommend publishing manually from your computer in this case. You might be able to hack it by pushing a commit that does some modifications to the build
We might still need to make some changes in sbt-ci-release to detect this case because the plugin assumes there must be a git tag push in order to do a stable release https://github.com/olafurpg/sbt-ci-release/blob/5f0ca4509f4f0161168220cec7776df592daf7dd/plugin/src/main/scala/com/geirsson/CiReleasePlugin.scala#L33 |
Not sure if this would work for the modules maintained by Scala team + contributors since we normally limit the people who has Sonatype credentials, and we also want to give maintainers with repo push rights to be able to back publish artifacts. I wonder if we can encode subproject name and optional Scala version name into the tag as follows:
examples
|
@eed3si9n You could push a tag for a commit that
This plugin doesn't so much except delegate to other plugins like sbt-dynver (to set the version) and sbt-sonatype (to publish). I'm not sure how much we can do to solve this problem generically. |
Alternatively, in a lot of projects I suspect it's OK to publish a new version with the entire new cross build. |
I sort of did this for our modules (https://github.com/scala/scala-parser-combinators/blob/d2e6685145ca4a9298c3d2ac0bde5ccf090f5d99/build.sh#L13-L15) but you still end up running in limitations. I think the best solution is to push a new commit that modifies the |
@dwijnand is ignoring |
I think there's no basis for dynver to be doing that out the box. It's really trivial to post-process the version string: https://github.com/dwijnand/sbt-dynver#custom-version-string Personally I would look to moving to a git-ops like setup here, for back-publishing versions, instead of trying to codifying this with some crazy string pattern. |
sorry, no idea what that means |
I couldn't find a good reference, but my understanding of the basic premise is you encode in a git repo the state you want the world and have an operator execute it. So here you'd PR a descriptor file which describes what to release and CI would make it so. |
https://www.weave.works/blog/gitops-operations-by-pull-request In Kubernetes deployment, instead of using command line to manually deploy things, GitOps tells you to put all the configurations into another repo, and send a pull request to it instead (Upon merge, a robot does the configuration change). |
Gonna close this as won't fix. My recommendation would be to manually back-publish in case releasing a new version is not an option. In my projects, I always publish a new version because it's quite common that the master branch includes 1-2 commits that affect semantics anyways. |
Here's an example of someone doing back-publishing via a custom GitHub Actions workflow (rather than falling back to using their own laptop): typelevel/kind-projector#206 |
We also actually did that recently to not need to release full Metals release 😅 |
I have a PR for back publishing support - #322. The current "bump the version" approach effectively pushes the work of figuring out the correct patch version number to the end users. In addition, if the plugin or the library does not cross publish all variants, then the end user might need to figure out different patch version to use the same code. For plugins like compiler plugins and sbt plugins (during 2.x milestones) I think this is a must-have feature. |
e.g. suppose I already published for JVM and Native and Scala.js 1.0.0-RC2, but now I want to publish the same version again but for Scala.js 1.0.0 final only
@olafurpg how do you suggest that people do this? tag and push a commit that removes the release combinations you don't want?
The text was updated successfully, but these errors were encountered: