diff --git a/BUILD b/BUILD index 951bdbf3..2748cf12 100644 --- a/BUILD +++ b/BUILD @@ -11,6 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@score_cli_helper//:cli_helper.bzl", "cli_helper") load("@score_cr_checker//:cr_checker.bzl", "copyright_checker") package(default_visibility = ["//visibility:public"]) @@ -32,3 +33,8 @@ exports_files([ "MODULE.bazel", "BUILD", ]) + +cli_helper( + name = "cli-help", + visibility = ["//visibility:public"], +) diff --git a/MODULE.bazel b/MODULE.bazel index 000db285..c2a10b48 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -98,3 +98,4 @@ bazel_dep(name = "score_cr_checker", version = "0.3.1") # Grab dash bazel_dep(name = "score_dash_license_checker", version = "0.1.1") bazel_dep(name = "score_process", version = "1.0.4") +bazel_dep(name = "score_cli_helper", version = "0.1.1") diff --git a/docs.bzl b/docs.bzl index 8d7cb482..84c3ef97 100644 --- a/docs.bzl +++ b/docs.bzl @@ -126,18 +126,17 @@ def _incremental(incremental_name = "incremental", live_name = "live_preview", s # Create description tags for the incremental targets. call_path = native.package_name() - incremental_tag = "cli_help=Build documentation incrementally:\nbazel run //" + call_path + ":" + incremental_name + incremental_tag = "cli_help=Build documentation incrementally => bazel run //" + call_path + ":" + incremental_name + "\n\n" if incremental_name == "incremental_latest": incremental_tag = ( "cli_help=Build documentation incrementally (use current main branch of imported docs repositories " + - "(e.g. process_description)):\n" + - "bazel run //" + call_path + ":incremental_latest" + "(e.g. process_description)) => bazel run //" + call_path + ":incremental_latest\n\n" ) elif incremental_name == "incremental_release": incremental_tag = ( - "cli_help=Build documentation incrementally (use release version imported in MODULE.bazel):\n" + - "bazel run //" + call_path + ":incremental_release" + "cli_help=Build documentation incrementally (use release version imported in MODULE.bazel) => " + + "bazel run //" + call_path + ":incremental_release\n\n" ) py_binary( @@ -177,8 +176,7 @@ def _ide_support(extra_dependencies): venv_name = ".venv_docs", reqs = sphinx_requirements + extra_dependencies, tags = [ - "cli_help=Create virtual environment for documentation:\n" + - "bazel run //" + call_path + ":ide_support", + "cli_help=Create virtual environment for documentation => " + "bazel run //" + call_path + ":ide_support\n\n", ], )