mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-10-02 05:39:07 -04:00
bazel: add cli doc generation to //:generate
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
8489516208
commit
e021245660
3 changed files with 34 additions and 55 deletions
|
@ -381,6 +381,17 @@ multirun(
|
|||
jobs = 0, # execute concurrently
|
||||
)
|
||||
|
||||
sh_template(
|
||||
name = "cli_docgen",
|
||||
data = [
|
||||
"//hack/clidocgen",
|
||||
],
|
||||
substitutions = {
|
||||
"@@CLIDOCGEN@@": "$(rootpath //hack/clidocgen:clidocgen)",
|
||||
},
|
||||
template = "cli_docgen.sh.in",
|
||||
)
|
||||
|
||||
multirun(
|
||||
name = "tidy",
|
||||
commands = [
|
||||
|
@ -432,6 +443,7 @@ multirun(
|
|||
"//3rdparty/bazel/com_github_medik8s_node_maintainance_operator:pull_files",
|
||||
":go_generate",
|
||||
":proto_generate",
|
||||
":cli_docgen",
|
||||
],
|
||||
jobs = 1, # execute sequentially
|
||||
visibility = ["//visibility:public"],
|
||||
|
|
22
bazel/ci/cli_docgen.sh.in
Normal file
22
bazel/ci/cli_docgen.sh.in
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
###### script header ######
|
||||
|
||||
lib=$(realpath @@BASE_LIB@@) || exit 1
|
||||
stat "${lib}" >> /dev/null || exit 1
|
||||
|
||||
# shellcheck source=../sh/lib.bash
|
||||
if ! source "${lib}"; then
|
||||
echo "Error: could not find import"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
clidocgen=$(realpath @@CLIDOCGEN@@)
|
||||
stat "${clidocgen}" >> /dev/null
|
||||
|
||||
cd "${BUILD_WORKSPACE_DIRECTORY}"
|
||||
|
||||
###### script body ######
|
||||
|
||||
cd hack/clidocgen
|
||||
${clidocgen} | cat header.md - > ../../docs/docs/reference/cli.md
|
Loading…
Add table
Add a link
Reference in a new issue