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"
|
||||
|
||||
scalaVersion := "2.10.2"
|
||||
ThisBuild / scalaVersion := "2.12.8"
|
||||
|
||||
scalacOptions in (Compile, doc) := Seq("-doc-root-content", rootContentFile)
|
||||
|
||||
TaskKey[Unit]("changeRootContent") := {
|
||||
IO.write(file(rootContentFile), newContents)
|
||||
}
|
||||
|
||||
TaskKey[Unit]("check") := {
|
||||
val packageHtml = (target in Compile in doc).value / "package.html"
|
||||
assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" )
|
||||
}
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
Compile / doc / scalacOptions := Seq("-doc-root-content", rootContentFile),
|
||||
TaskKey[Unit]("changeRootContent") := {
|
||||
IO.write(file(rootContentFile), newContents)
|
||||
},
|
||||
TaskKey[Unit]("check") := {
|
||||
val packageHtml = (Compile / doc / target).value / "index.html"
|
||||
assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" )
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue