1
1
import ScalaModulePlugin ._
2
2
import sbtcrossproject .{crossProject , CrossType }
3
3
import _root_ .scalafix .sbt .BuildInfo .{scalafixVersion , scala212 => scalafixScala212 }
4
+ import sys .process ._
4
5
5
6
lazy val commonSettings = Seq (
6
- // this line could be removed after https://github.com/scala/sbt-scala-module/issues/48 is fixed
7
- licenses := Seq ((" Apache-2.0" , url(" https://www.apache.org/licenses/LICENSE-2.0" ))),
8
7
headerLicense := Some (HeaderLicense .Custom (
9
8
s """ |Scala (https://www.scala-lang.org)
10
9
|
@@ -83,7 +82,7 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform)(
83
82
val x = (baseDirectory in LocalRootProject ).value.toURI.toString
84
83
val y = " https://raw.githubusercontent.com/scala/scala-collection-compat/" + sys.process
85
84
.Process (" git rev-parse HEAD" )
86
- .lines_ !
85
+ .lineStream_ !
87
86
.head
88
87
s " -P:scalajs:mapSourceURI: $x-> $y/ "
89
88
},
@@ -315,7 +314,7 @@ inThisBuild(
315
314
state
316
315
},
317
316
commands += Command .command(" ci" ) { state =>
318
- val toRun =
317
+ val toRun : Seq [ String ] =
319
318
if (isScalafmt) {
320
319
Seq (" scalafmt-test" )
321
320
} else {
@@ -359,7 +358,7 @@ inThisBuild(
359
358
if (releaseVersion.nonEmpty && ! isBinaryCompat) {
360
359
List (
361
360
preRelease,
362
- s " $projectPrefix/publish-signed "
361
+ s " $projectPrefix/publishSigned "
363
362
)
364
363
} else {
365
364
Nil
@@ -379,6 +378,7 @@ inThisBuild(
379
378
toRun.foreach(println)
380
379
println(" ---------" )
381
380
382
- toRun ::: state
381
+ val newCommands = toRun.toList.map(Exec (_, None ))
382
+ state.copy(remainingCommands = newCommands ::: state.remainingCommands)
383
383
}
384
384
))
0 commit comments