Skip to content

Commit 6e90fe4

Browse files
Make sbt publish command use its base command as well
So that the correct Dotty version ends up in scope
1 parent 5340e15 commit 6e90fe4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ final case class MillCommunityProject(project: String, baseCommand: String,
8787

8888
final case class SbtCommunityProject(project: String, sbtTestCommand: String,
8989
sbtUpdateCommand: String, extraSbtArgs: List[String] = Nil,
90-
dependencies: List[CommunityProject] = Nil, publishCommand: String = null) extends CommunityProject
90+
dependencies: List[CommunityProject] = Nil, sbtPublishCommand: String = null) extends CommunityProject
9191
override val binaryName: String = "sbt"
9292
private val baseCommand = s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! "
9393
override val testCommand = s"$baseCommand$sbtTestCommand"
9494
override val updateCommand = s"$baseCommand$sbtUpdateCommand"
95+
override val publishCommand = s"$baseCommand$sbtPublishCommand"
9596

9697
override val runCommandsArgs: List[String] =
9798
// Run the sbt command with the compiler version and sbt plugin set in the build
@@ -147,21 +148,21 @@ object projects
147148
project = "scalacheck",
148149
sbtTestCommand = "jvm/test",
149150
sbtUpdateCommand = "jvm/test:update",
150-
publishCommand = ";set jvm/publishArtifact in (Compile, packageDoc) := false ;jvm/publishLocal"
151+
sbtPublishCommand = ";set jvm/publishArtifact in (Compile, packageDoc) := false ;jvm/publishLocal"
151152
)
152153

153154
lazy val scalatest = SbtCommunityProject(
154155
project = "scalatest",
155156
sbtTestCommand = ";scalacticDotty/clean;scalacticTestDotty/test;scalatestTestDotty/test",
156157
sbtUpdateCommand = "scalatest/update",
157-
publishCommand = ";scalacticDotty/publishLocal; scalatestDotty/publishLocal"
158+
sbtPublishCommand = ";scalacticDotty/publishLocal; scalatestDotty/publishLocal"
158159
)
159160

160161
lazy val scalatestplusScalacheck = SbtCommunityProject(
161162
project = "scalatestplus-scalacheck",
162163
sbtTestCommand = "scalatestPlusScalaCheckJVM/compile", // TODO: compile only because tests are prone to java.lang.OutOfMemoryError: Metaspace
163164
sbtUpdateCommand = "scalatestPlusScalaCheckJVM/update",
164-
publishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
165+
sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
165166
dependencies = List(scalatest, scalacheck)
166167
)
167168

0 commit comments

Comments
 (0)