Add generated docs to Jekyll tree build target. Add script for bringing up
local instance of bazel.io site.
* Add a new genrule rule that runs the new jekyll-tree.sh to do the following:
* Combine the generated docs for the Build Encyclopedia and Skylark Library
with the static site docs
* Combine the README.md files for the Docker and Packaging rules with the
Jekyll tree
* Process the generated docs, replaces instances of "blaze" with "bazel",
etc.
* Add scripts/serve-docs.sh script that can be used to bring up a local
instance of the bazel.io website.
As of this patch, it is possible to construct the full Bazel.io site tree from
the master branch.
--
MOS_MIGRATED_REVID=121813688
diff --git a/site/BUILD b/site/BUILD
index 2cc9736..d1107bc 100644
--- a/site/BUILD
+++ b/site/BUILD
@@ -64,7 +64,7 @@
)
pkg_tar(
- name = "jekyll-tree",
+ name = "jekyll-base",
deps = [
":bootstrap-css",
":bootstrap-images",
@@ -74,3 +74,31 @@
":jekyll-files",
],
)
+
+pkg_tar(
+ name = "skylark-rule-docs",
+ files = [
+ "//tools/build_defs/docker:README.md",
+ "//tools/build_defs/pkg:README.md",
+ ],
+ strip_prefix = "/tools/build_defs",
+)
+
+genrule(
+ name = "jekyll-tree",
+ srcs = [
+ ":jekyll-base",
+ ":skylark-rule-docs",
+ "//src/main/java/com/google/devtools/build/lib:gen_buildencyclopedia",
+ "//src/main/java/com/google/devtools/build/lib:gen_skylarklibrary",
+ ],
+ outs = ["jekyll-tree.tar"],
+ cmd = ("$(location jekyll-tree.sh) $@ " +
+ "$(location :jekyll-base) " +
+ "$(location :skylark-rule-docs) " +
+ "$(location //src/main/java/com/google/devtools/build/lib:gen_buildencyclopedia) " +
+ "$(location //src/main/java/com/google/devtools/build/lib:gen_skylarklibrary)"),
+ tools = [
+ "jekyll-tree.sh",
+ ],
+)