Revert "restrict Sphinx tasks to akka-docs cage"

This reverts commit 2ef7e7a699.
This commit is contained in:
Peter Vlugter 2012-07-28 10:43:31 +12:00
parent 93c11e50a3
commit bc47c421d0
3 changed files with 15 additions and 17 deletions

View file

@ -15,7 +15,7 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
import java.lang.Boolean.getBoolean
import sbt.Tests
import Sphinx.{ sphinxDocs, sphinxTags }
import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags }
object AkkaBuild extends Build {
System.setProperty("akka.mode", "test") // Is there better place for this?
@ -30,7 +30,7 @@ object AkkaBuild extends Build {
lazy val akka = Project(
id = "akka",
base = file("."),
settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Publish.versionSettings ++
settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Sphinx.settings ++ Publish.versionSettings ++
Dist.settings ++ mimaSettings ++ Seq(
testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean,
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean,
@ -51,7 +51,13 @@ object AkkaBuild extends Build {
|implicit def ec = system.dispatcher
|implicit val timeout = Timeout(5 seconds)
|""".stripMargin,
initialCommands in Test in ThisBuild += "import akka.testkit._"
initialCommands in Test in ThisBuild += "import akka.testkit._",
// online version of docs
sphinxDocs <<= baseDirectory / "akka-docs",
sphinxTags in sphinxHtml += "online",
sphinxPygments <<= sphinxPygments in LocalProject(docs.id),
sphinxLatex <<= sphinxLatex in LocalProject(docs.id),
sphinxPdf <<= sphinxPdf in LocalProject(docs.id)
),
aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, /*akkaSbtPlugin,*/ samples, tutorials, osgi, osgiAries, docs)
)
@ -314,9 +320,7 @@ object AkkaBuild extends Build {
unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get },
libraryDependencies ++= Dependencies.docs,
unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"),
// online version of docs
sphinxTags in Sphinx.Html += "online"
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v")
)
)

View file

@ -23,7 +23,7 @@ object Release {
val repo = extracted.get(Publish.defaultPublishTo)
val state1 = extracted.runAggregated(publish in projectRef, state)
val (state2, api) = extracted.runTask(Unidoc.unidoc, state1)
val (state3, docs) = extracted.runTask(Sphinx.sphinx in docsProject, state2)
val (state3, docs) = extracted.runTask(Sphinx.sphinx, state2)
val (state4, dist) = extracted.runTask(Dist.dist, state3)
IO.delete(release)
IO.createDirectory(release)
@ -33,7 +33,4 @@ object Release {
IO.copyFile(dist, release / "downloads" / dist.name)
state4
}
def docsProject: ProjectReference = LocalProject(AkkaBuild.docs.id)
}

View file

@ -23,18 +23,15 @@ object Sphinx {
sphinxDocs <<= baseDirectory,
sphinxTarget <<= crossTarget / "sphinx",
sphinxPygmentsDir <<= sphinxDocs { _ / "_sphinx" / "pygments" },
sphinxTags in Html := Seq.empty,
sphinxTags in Latex := Seq.empty,
sphinxTags in sphinxHtml := Seq.empty,
sphinxTags in sphinxLatex := Seq.empty,
sphinxPygments <<= pygmentsTask,
sphinxHtml <<= buildTask("html", sphinxTags in Html),
sphinxLatex <<= buildTask("latex", sphinxTags in Latex),
sphinxHtml <<= buildTask("html", sphinxTags in sphinxHtml),
sphinxLatex <<= buildTask("latex", sphinxTags in sphinxLatex),
sphinxPdf <<= pdfTask,
sphinx <<= sphinxTask
)
lazy val Latex = Configuration("sphinx-latex", "tags for LaTeX version of docs", true, Nil, false)
lazy val Html = Configuration("sphinx-html", "tags for HTML version of docs", true, Nil, false)
def pygmentsTask = (sphinxDocs, sphinxPygmentsDir, sphinxTarget, streams) map {
(cwd, pygments, baseTarget, s) => {
val target = baseTarget / "site-packages"