fix actions/doc-file-options

This commit is contained in:
Eugene Yokota 2019-01-03 15:11:58 -05:00
parent d1b921535b
commit 3f405daf6a
1 changed files with 12 additions and 11 deletions

View File

@ -2,15 +2,16 @@ val newContents = "bbbbbbbbb"
val rootContentFile = "root.txt" val rootContentFile = "root.txt"
scalaVersion := "2.10.2" ThisBuild / scalaVersion := "2.12.8"
scalacOptions in (Compile, doc) := Seq("-doc-root-content", rootContentFile) lazy val root = (project in file("."))
.settings(
TaskKey[Unit]("changeRootContent") := { Compile / doc / scalacOptions := Seq("-doc-root-content", rootContentFile),
TaskKey[Unit]("changeRootContent") := {
IO.write(file(rootContentFile), newContents) IO.write(file(rootContentFile), newContents)
} },
TaskKey[Unit]("check") := {
TaskKey[Unit]("check") := { val packageHtml = (Compile / doc / target).value / "index.html"
val packageHtml = (target in Compile in doc).value / "package.html"
assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" ) assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" )
} }
)