From 03d968b10ec3b2f98b7f24fe7d488e859ea9822f Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 21 Sep 2012 15:53:59 +0200 Subject: [PATCH] add some comments, fix experimental status of cluster --- akka-docs/rst/cluster/cluster-usage.rst | 2 +- project/AkkaBuild.scala | 4 +++- project/Sphinx.scala | 11 ++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/akka-docs/rst/cluster/cluster-usage.rst b/akka-docs/rst/cluster/cluster-usage.rst index a01aa69cc9..3c8b112bef 100644 --- a/akka-docs/rst/cluster/cluster-usage.rst +++ b/akka-docs/rst/cluster/cluster-usage.rst @@ -20,7 +20,7 @@ The Akka cluster is a separate jar file. Make sure that you have the following d If you are using the latest nightly build you should pick a timestamped Akka version from -``_. +``_. We recommend against using ``SNAPSHOT`` in order to obtain stable builds. A Simple Cluster Example diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index d2922e800e..f54d39627e 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -469,6 +469,8 @@ object AkkaBuild extends Build { testOptions in Test += Tests.Argument("-oDF") ) + // customization of sphinx @@ replacements, add to all sphinx-using projects + // add additional replacements here lazy val sphinxReplacements = Seq( sphinxVars <<= (scalaVersion, version) { (s, v) => val BinVer = """(\d+\.\d+)\.\d+""".r @@ -489,7 +491,7 @@ object AkkaBuild extends Build { }) ) }, - sphinxExts += "py" + sphinxExts += "py" // needed for transforming conf.py ) lazy val formatSettings = ScalariformPlugin.scalariformSettings ++ Seq( diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 31dfd124ed..4a7dad2878 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -67,7 +67,12 @@ object Sphinx { def dst(f: File) = temp.toPath.resolve(docs.toPath.relativize(f.toPath)).toFile def filter(f: File) = filterExt contains f.getName.reverse.takeWhile('.' !=).reverse val Replacer = """@(\w+)@""".r + /* + * First Step: bring filtered source tree in sync with orig source tree + */ + // delete files which were removed in.removed foreach (f => IO delete dst(f)) + // transform the other files by applying the replacement map for @@ tokens (in.modified ++ (in.checked -- out.checked)).toSeq.sorted foreach { f => if (f.isFile) if (filter(f)) { @@ -84,10 +89,14 @@ object Sphinx { } } } else { + // do not transform PNGs et al s.log.debug("Changed documentation source (copying): " + f) IO.copyFile(f, dst(f)) } } + /* + * Second Step: invoke sphinx-build + */ val tagList = if (tags.isEmpty) "" else tags.mkString(" (", ", ", ")") val desc = "%s%s" format (builder, tagList) s.log.info("Building Sphinx %s documentation..." format desc) @@ -101,7 +110,7 @@ object Sphinx { s.log.info("Sphinx %s documentation created: %s" format (desc, target)) temp.descendentsExcept("*", "").get.toSet } - val toplevel = docs * ("*" - ".*" - "_sphinx" - "_build" - "disabled" - "target") + val toplevel = docs * ("*" - "disabled") val inputs = toplevel.descendentsExcept("*", "").get.toSet cached(inputs) target