summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Lawson2020-02-28 10:04:31 -0800
committerGitHub2020-02-28 18:04:31 +0000
commit016939265e15936dc3ba9310d1a79ec1f60176f6 (patch)
treea4d6ee5c1be8a417777f8b625f33e6407edb2c85
parent377685145e8031fae7129d26d1ee4bd72f538355 (diff)
Retain default version assignment (#1365)
The release process uses python to scan and set expected versions for a release. The `val defaultVersions = ` stanza should be present for this to work.
-rw-r--r--build.sc12
1 files changed, 11 insertions, 1 deletions
diff --git a/build.sc b/build.sc
index 7084a1f9..821d71e0 100644
--- a/build.sc
+++ b/build.sc
@@ -8,6 +8,16 @@ import mill.contrib.buildinfo.BuildInfo
object chisel3 extends mill.Cross[chisel3CrossModule]("2.11.12", "2.12.10")
+// The following stanza is searched for and used when preparing releases.
+// Please retain it.
+// Provide a managed dependency on X if -DXVersion="" is supplied on the command line.
+val defaultVersions = Map("firrtl" -> "1.3-SNAPSHOT")
+
+def getVersion(dep: String, org: String = "edu.berkeley.cs") = {
+ val version = sys.env.getOrElse(dep + "Version", defaultVersions(dep))
+ ivy"$org::$dep:$version"
+}
+
// Since chisel contains submodule chiselFrontend and coreMacros, a CommonModule is needed
trait CommonModule extends ScalaModule with SbtModule with PublishModule {
def firrtlModule: Option[PublishModule]
@@ -32,7 +42,7 @@ trait CommonModule extends ScalaModule with SbtModule with PublishModule {
}
def ivyDeps = if(firrtlModule.isEmpty) Agg(
- ivy"edu.berkeley.cs::firrtl:1.3-SNAPSHOT",
+ getVersion("firrtl"),
) else Agg.empty[Dep]
def moduleDeps = Seq() ++ firrtlModule