Skip to content

Commit

Permalink
Retain default version assignment (#1365)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ucbjrl authored Feb 28, 2020
1 parent 3776851 commit 0169392
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down

0 comments on commit 0169392

Please # to comment.