Skip to content

Commit

Permalink
fix build release problem (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
chick authored Aug 14, 2020
1 parent 6ea6f61 commit 387d870
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.11.12", "2.12.12")
// Please retain it.
// Provide a managed dependency on X if -DXVersion="" is supplied on the command line.
val defaultVersions = Map(
"firrtl" -> "1.4-SNAPSHOT",
"firrtl" -> "1.4-SNAPSHOT"
)

val testDefaultVersions = Map(
"treadle" -> "1.3-SNAPSHOT"
)

Expand All @@ -21,6 +24,11 @@ def getVersion(dep: String, org: String = "edu.berkeley.cs") = {
ivy"$org::$dep:$version"
}

def getTestVersion(dep: String, org: String = "edu.berkeley.cs") = {
val version = sys.env.getOrElse(dep + "Version", testDefaultVersions(dep))
ivy"$org::$dep:$version"
}

// Since chisel contains submodule core and macros, a CommonModule is needed
trait CommonModule extends ScalaModule with SbtModule with PublishModule {
def firrtlModule: Option[PublishModule] = None
Expand All @@ -32,7 +40,7 @@ trait CommonModule extends ScalaModule with SbtModule with PublishModule {
def treadleModule: Option[PublishModule] = None

def treadleIvyDeps = if(treadleModule.isEmpty) Agg(
getVersion("treadle")
getTestVersion("treadle")
) else Agg.empty[Dep]

def moduleDeps = super.moduleDeps ++ firrtlModule
Expand Down

0 comments on commit 387d870

Please sign in to comment.