mirror of https://github.com/sbt/sbt.git
fix actions/doc-file-options
This commit is contained in:
parent
d1b921535b
commit
3f405daf6a
|
|
@ -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),
|
||||||
IO.write(file(rootContentFile), newContents)
|
TaskKey[Unit]("changeRootContent") := {
|
||||||
}
|
IO.write(file(rootContentFile), newContents)
|
||||||
|
},
|
||||||
TaskKey[Unit]("check") := {
|
TaskKey[Unit]("check") := {
|
||||||
val packageHtml = (target in Compile in doc).value / "package.html"
|
val packageHtml = (Compile / doc / target).value / "index.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}" )
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue