diff options
author | Yifan Hong <elsk@google.com> | 2021-09-17 17:05:57 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2021-09-17 17:07:02 -0700 |
commit | 7817ff507db7684b3cda28411e751c188bf00d09 (patch) | |
tree | da835fdc5ea873f6b179e75afd8b5b5219036f22 | |
parent | d985bcceb3210661106c1f6900fa9c533fe35a20 (diff) | |
download | bazel_common_rules-7817ff507db7684b3cda28411e751c188bf00d09.tar.gz |
docs: Use positional argument for resources
Test: pass
Change-Id: Iad3ac449fcde352216387b923ca3bc449ed6d48d
-rw-r--r-- | docs/docs.bzl | 4 | ||||
-rwxr-xr-x | docs/insert_resource.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/docs.bzl b/docs/docs.bzl index 86bee77..1fe02bc 100644 --- a/docs/docs.bzl +++ b/docs/docs.bzl @@ -104,8 +104,8 @@ def docs( $(location //build/bazel_common_rules/docs:insert_resource.py) \ --infile $(location //build/bazel_common_rules/docs:index.html) \ --outfile $(location {name}/root/index.html) \ - --resources $(location :{name}_default_file.html.frag) \ - $(locations :{name}_markdown_files) + $(location :{name}_default_file.html.frag) \ + $(locations :{name}_markdown_files) """.format(name = name), tools = [ "//build/bazel_common_rules/docs:insert_resource.py", diff --git a/docs/insert_resource.py b/docs/insert_resource.py index 4c4664b..02260c2 100755 --- a/docs/insert_resource.py +++ b/docs/insert_resource.py @@ -35,6 +35,6 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description=main.__doc__) parser.add_argument("--infile", required=True, type=argparse.FileType('r'), help="input file") parser.add_argument("--outfile", required=True, type=argparse.FileType('w'), help="output file") - parser.add_argument("--resources", nargs='+', help="resource files") + parser.add_argument("resources", nargs='+', help="resource files") args = parser.parse_args() main(**vars(args)) |