sbt-release icon indicating copy to clipboard operation
sbt-release copied to clipboard

cross-sbt version example

Open thesamet opened this issue 8 years ago • 5 comments

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.

thesamet avatar Jul 13 '17 04:07 thesamet

dog fooding in sbt-release plugin

https://github.com/sbt/sbt-release/blob/v1.0.6/build.sbt#L50

releaseStepCommandAndRemaining("^ publishSigned") should work

xuwei-k avatar Jul 30 '17 07:07 xuwei-k

Is there a settting like releaseCrossBuild for sbt plugins?

Atry avatar Jul 31 '17 01:07 Atry

@Atry you can do crossSbtVersions := Vector("1.0.0", "0.13.16")

imarios avatar Aug 12 '17 02:08 imarios

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.

Atry avatar Aug 12 '17 03:08 Atry

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?

devkat avatar Oct 30 '17 10:10 devkat