Skip to content

Commit 1897241

Browse files
committed
Write down Dotty base version when publishing documentation
1 parent e1365d9 commit 1897241

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

project/Build.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ object ExposedValues extends AutoPlugin {
3636

3737
object Build {
3838

39+
val baseVersion = "0.5.0"
3940
val scalacVersion = "2.12.4"
4041

4142
val dottyOrganization = "ch.epfl.lamp"
4243
val dottyGithubUrl = "https://github.com/lampepfl/dotty"
4344
val dottyVersion = {
44-
val baseVersion = "0.5.0"
4545
val isNightly = sys.env.get("NIGHTLYBUILD") == Some("yes")
4646
val isRelease = sys.env.get("RELEASEBUILD") == Some("yes")
4747
if (isNightly)
@@ -307,6 +307,10 @@ object Build {
307307
parallelExecution in Test := false,
308308

309309
genDocs := Def.taskDyn {
310+
// Make baseVersion available at dotty.epfl.ch/versions
311+
// Used by sbt-dotty to resolve the latest nightly
312+
IO.write(file("./docs/_site/versions"), s"baseVersion=$baseVersion")
313+
310314
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
311315
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
312316
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
@@ -320,9 +324,9 @@ object Build {
320324
"-project-url", dottyGithubUrl,
321325
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
322326
)
323-
(runMain in Compile).toTask(
324-
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
325-
)
327+
(runMain in Compile).toTask(
328+
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
329+
)
326330
}.value,
327331

328332
dottydoc := Def.inputTaskDyn {

0 commit comments

Comments
 (0)