Add ReleaseNotes/BUILD

With both genasciidoc and genasciidoc_zip rules.

Change-Id: Ie796a81cd578a1217ea45b1ab9d449a7b97d5532
This commit is contained in:
Yuxuan 'fishy' Wang 2016-10-06 03:37:57 +08:00
parent 14fdf9342e
commit 515c59273c
2 changed files with 43 additions and 0 deletions

27
ReleaseNotes/BUILD Normal file
View File

@ -0,0 +1,27 @@
load("//tools/bzl:asciidoc.bzl", "release_notes_attributes")
load("//tools/bzl:asciidoc.bzl", "genasciidoc")
load("//tools/bzl:asciidoc.bzl", "genasciidoc_zip")
SRCS = glob(['*.txt'])
genasciidoc(
name = 'ReleaseNotes',
srcs = SRCS,
attributes = release_notes_attributes(),
backend = 'html5',
searchbox = False,
resources = False,
visibility = ["//visibility:public"],
)
genasciidoc_zip(
name = "html",
srcs = SRCS,
attributes = release_notes_attributes(),
backend = 'html5',
searchbox = False,
resources = False,
visibility = ["//visibility:public"],
)

View File

@ -18,6 +18,22 @@ def documentation_attributes():
]
def release_notes_attributes():
return [
'toc',
'newline="\\n"',
'asterisk="*"',
'plus="+"',
'caret="^"',
'startsb="["',
'endsb="]"',
'tilde="~"',
'last-update-label!',
'stylesheet=DEFAULT',
'linkcss=true',
]
def _replace_macros_impl(ctx):
cmd = [
ctx.file._exe.path,