Skip to content

Commit 964fdf1

Browse files
committed
Publish Dotty nightly major version when generating documentation
1 parent 68cc7ee commit 964fdf1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

project/Build.scala

Lines changed: 9 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)
@@ -308,6 +308,11 @@ object Build {
308308
parallelExecution in Test := false,
309309

310310
genDocs := Def.taskDyn {
311+
// Make majorVersion available at dotty.epfl.ch/versions/latest-nightly-base
312+
// Used by sbt-dotty to resolve the latest nightly
313+
val majorVersion = baseVersion.take(baseVersion.lastIndexOf('.'))
314+
IO.write(file("./docs/_site/versions/latest-nightly-base"), majorVersion)
315+
311316
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
312317
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
313318
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
@@ -321,9 +326,9 @@ object Build {
321326
"-project-url", dottyGithubUrl,
322327
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
323328
)
324-
(runMain in Compile).toTask(
325-
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
326-
)
329+
(runMain in Compile).toTask(
330+
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
331+
)
327332
}.value,
328333

329334
dottydoc := Def.inputTaskDyn {

0 commit comments

Comments
 (0)