sbt-release
sbt-release copied to clipboard
cross-sbt version example
I am using sbt-release to release a sbt plugin that cross-compiles for sbt 0.13.15 and sbt 1.0.0-M6 (via settting crossSbtVersions := Seq("0.13.15", "1.0.0-M6")
How do I get the publish step (and hopefully other steps such as runTest) to run for each of the SBT versions? I tried to replace publishArtifacts in my releaseProcess to releaseStepCommand("^publish") but that doesn't seem to work.
dog fooding in sbt-release plugin
https://github.com/sbt/sbt-release/blob/v1.0.6/build.sbt#L50
releaseStepCommandAndRemaining("^ publishSigned") should work
Is there a settting like releaseCrossBuild for sbt plugins?
@Atry you can do crossSbtVersions := Vector("1.0.0", "0.13.16")
IIRC, releaseCrossBuild is a boolean setting, which tells sbt-release to take account of crossScalaVersions.
So ideally the new releaseCrossSbt should tells sbt-release to take account of crossSbtVersions.
I'm trying to publish like this:
releaseStepCommandAndRemaining("^ publish"),
but the sbt 0.13 artifact is uploaded as my-sbt-plugin_2.10_1.0/ instead of my-sbt-plugin_2.10_0.13/. What am I doing wrong?
[info] Setting `sbtVersion in pluginCrossBuild` to 0.13.16
…
[info] Packaging …/scala-2.10/sbt-0.13/my-sbt-plugin-0.93.jar ...
…
[info] Uploading: …/my-sbt-plugin_2.10_1.0/0.93/my-sbt-plugin-0.93.jar
Might be related to https://github.com/sbt/sbt/issues/3473.
Interestingly, the paths are correct for local publishing (^ publishLocal instead of ^ publish). So it might be a problem in sbt (not using sbtVersion in pluginCrossBuild ).
By the way, before this we were using the publishArtifacts release step. Is it possible to run this step in a cross-sbt fashion instead of calling the ^ publish command directly?