Add ReleaseNotes/BUILD
With both genasciidoc and genasciidoc_zip rules. Change-Id: Ie796a81cd578a1217ea45b1ab9d449a7b97d5532
This commit is contained in:
parent
14fdf9342e
commit
515c59273c
27
ReleaseNotes/BUILD
Normal file
27
ReleaseNotes/BUILD
Normal 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"],
|
||||
)
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user