From 387d87050f1ea97324d6abe8b5a744c58d03a00c Mon Sep 17 00:00:00 2001 From: Chick Markley Date: Fri, 14 Aug 2020 15:56:17 -0700 Subject: [PATCH] fix build release problem (#1556) --- build.sc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.sc b/build.sc index 89cf74647d9..8ae21352244 100644 --- a/build.sc +++ b/build.sc @@ -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" ) @@ -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 @@ -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