From 3f6975140b1ddea4eb6b1ce0eae2b018a8c59e48 Mon Sep 17 00:00:00 2001 From: David Chen Date: Mon, 9 May 2016 08:46:21 +0000 Subject: 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 --- site/BUILD | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'site/BUILD') diff --git a/site/BUILD b/site/BUILD index 2cc97369b1..d1107bc6c8 100644 --- a/site/BUILD +++ b/site/BUILD @@ -64,7 +64,7 @@ pkg_tar( ) pkg_tar( - name = "jekyll-tree", + name = "jekyll-base", deps = [ ":bootstrap-css", ":bootstrap-images", @@ -74,3 +74,31 @@ pkg_tar( ":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", + ], +) -- cgit v1.2.3