Skip to content

Commit

Permalink
Change /docs/BUILD file (#653)
Browse files Browse the repository at this point in the history
* Use latest version of bazel_pandoc

* Add a filegroup "docs"

bazel build //docs
Targets:
  bazel-bin/docs/manual.pdf
  bazel-bin/docs/html.html

* Change output of //docs:html

from
bazel-bin/docs/html.html
to
bazel-bin/docs/manual.html

Thanks to ProdriveTechnologies/bazel-pandoc#1
  • Loading branch information
regisd authored Dec 4, 2019
1 parent 5253071 commit 7ff3188
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
16 changes: 3 additions & 13 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,11 @@ load("@jflex_rules//jflex:deps.bzl", "jflex_deps")

jflex_deps()

# pandoc used to build the documentatoin

#http_archive(
# name = "bazel_pandoc",
# sha256 = "47ad1f08db3e6c8cc104931c11e099fd0603c174400b9cc852e2481abe08db24",
# strip_prefix = "bazel-pandoc-0.2",
# url = "https://github.com/ProdriveTechnologies/bazel-pandoc/archive/v0.2.tar.gz",
#)

# The unionset incompatible change was introduced in Bazel 0.26
# bazel_pandoc needs to update
# https://github.com/ProdriveTechnologies/bazel-pandoc/issues/6
# pandoc used to build the documentation

git_repository(
name = "bazel_pandoc",
commit = "7d87bb1463835bfea8438a5dae8f536d1857c97f",
commit = "68bcf3fb4dd1892e040f0986636805c7186c82ae",
remote = "https://github.com/ProdriveTechnologies/bazel-pandoc.git",
)

Expand Down
9 changes: 9 additions & 0 deletions docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pandoc(
# TODO: Add ["--filter", "pandoc-citeproc"] when #2 is fixed
# https://github.com/ProdriveTechnologies/bazel-pandoc/issues/2
options = [],
output = "manual.html",
to_format = "html",
)

Expand Down Expand Up @@ -52,3 +53,11 @@ genrule(
cmd = "echo '" + ("\n".join(["\\input{docs/md/" + section + "_tex}" for section in DOC_SECTIONS])) + "' > $@",
output_to_bindir = True, # that's where pdf_latex looks into
)

filegroup(
name = "docs",
srcs = [
":html",
":manual",
],
)

0 comments on commit 7ff3188

Please sign in to comment.