parent
be383ab276
commit
df8a82bc33
1 changed files with 54 additions and 48 deletions
|
|
@ -473,7 +473,7 @@ in
|
|||
};
|
||||
|
||||
# `hivectl` CLI reference freshness check. The committed
|
||||
# markdown at `docs/2-handbook/reference/hivectl-cli.md` is the rendered
|
||||
# markdown at `docs/2-handbook/tools/hivectl-cli.md` is the rendered
|
||||
# output of the hidden `hivectl markdown-docs` subcommand
|
||||
# (clap-markdown walks the binary's own command tree). This
|
||||
# check regenerates it from the built binary and fails if the
|
||||
|
|
@ -485,13 +485,13 @@ in
|
|||
# makes this check unsatisfiable rather than merely stale.
|
||||
# Regenerate locally with:
|
||||
# nix build .#default
|
||||
# ./result/bin/hivectl markdown-docs > docs/2-handbook/reference/hivectl-cli.md
|
||||
# ./result/bin/hivectl markdown-docs > docs/2-handbook/tools/hivectl-cli.md
|
||||
hivectl-docs = pkgs.runCommand "hivectl-docs-fresh" { nativeBuildInputs = [ pkgs.diffutils ]; } ''
|
||||
${self.packages.${system}.default}/bin/hivectl markdown-docs > generated.md
|
||||
if ! diff -u ${../docs/2-handbook/reference/hivectl-cli.md} generated.md; then
|
||||
if ! diff -u ${../docs/2-handbook/tools/hivectl-cli.md} generated.md; then
|
||||
echo "" >&2
|
||||
echo "ERROR: docs/2-handbook/reference/hivectl-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#default && ./result/bin/hivectl markdown-docs > docs/2-handbook/reference/hivectl-cli.md" >&2
|
||||
echo "ERROR: docs/2-handbook/tools/hivectl-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#default && ./result/bin/hivectl markdown-docs > docs/2-handbook/tools/hivectl-cli.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
touch "$out"
|
||||
|
|
@ -504,10 +504,10 @@ in
|
|||
# nix/packages/default.nix's comment on it).
|
||||
swarmctl-docs = pkgs.runCommand "swarmctl-docs-fresh" { nativeBuildInputs = [ pkgs.diffutils ]; } ''
|
||||
${self.packages.${system}.swarmctl}/bin/swarmctl markdown-docs > generated.md
|
||||
if ! diff -u ${../docs/2-handbook/reference/swarmctl-cli.md} generated.md; then
|
||||
if ! diff -u ${../docs/2-handbook/tools/swarmctl-cli.md} generated.md; then
|
||||
echo "" >&2
|
||||
echo "ERROR: docs/2-handbook/reference/swarmctl-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarmctl && ./result/bin/swarmctl markdown-docs > docs/2-handbook/reference/swarmctl-cli.md" >&2
|
||||
echo "ERROR: docs/2-handbook/tools/swarmctl-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarmctl && ./result/bin/swarmctl markdown-docs > docs/2-handbook/tools/swarmctl-cli.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
touch "$out"
|
||||
|
|
@ -521,10 +521,10 @@ in
|
|||
pkgs.runCommand "swarm-logs-docs-fresh" { nativeBuildInputs = [ pkgs.diffutils ]; }
|
||||
''
|
||||
${self.packages.${system}.swarm-logs}/bin/swarm-logs markdown-docs > generated.md
|
||||
if ! diff -u ${../docs/2-handbook/reference/swarm-logs-cli.md} generated.md; then
|
||||
if ! diff -u ${../docs/2-handbook/tools/swarm-logs-cli.md} generated.md; then
|
||||
echo "" >&2
|
||||
echo "ERROR: docs/2-handbook/reference/swarm-logs-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarm-logs && ./result/bin/swarm-logs markdown-docs > docs/2-handbook/reference/swarm-logs-cli.md" >&2
|
||||
echo "ERROR: docs/2-handbook/tools/swarm-logs-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarm-logs && ./result/bin/swarm-logs markdown-docs > docs/2-handbook/tools/swarm-logs-cli.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
touch "$out"
|
||||
|
|
@ -536,10 +536,10 @@ in
|
|||
pkgs.runCommand "swarm-metrics-docs-fresh" { nativeBuildInputs = [ pkgs.diffutils ]; }
|
||||
''
|
||||
${self.packages.${system}.swarm-metrics}/bin/swarm-metrics markdown-docs > generated.md
|
||||
if ! diff -u ${../docs/2-handbook/reference/swarm-metrics-cli.md} generated.md; then
|
||||
if ! diff -u ${../docs/2-handbook/tools/swarm-metrics-cli.md} generated.md; then
|
||||
echo "" >&2
|
||||
echo "ERROR: docs/2-handbook/reference/swarm-metrics-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarm-metrics && ./result/bin/swarm-metrics markdown-docs > docs/2-handbook/reference/swarm-metrics-cli.md" >&2
|
||||
echo "ERROR: docs/2-handbook/tools/swarm-metrics-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#swarm-metrics && ./result/bin/swarm-metrics markdown-docs > docs/2-handbook/tools/swarm-metrics-cli.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
touch "$out"
|
||||
|
|
@ -554,10 +554,10 @@ in
|
|||
pkgs.runCommand "hive-forge-docs-fresh" { nativeBuildInputs = [ pkgs.diffutils ]; }
|
||||
''
|
||||
${self.packages.${system}.hive-forge}/bin/hive-forge markdown-docs > generated.md
|
||||
if ! diff -u ${../docs/2-handbook/reference/forge-cli.md} generated.md; then
|
||||
if ! diff -u ${../docs/2-handbook/tools/forge-cli.md} generated.md; then
|
||||
echo "" >&2
|
||||
echo "ERROR: docs/2-handbook/reference/forge-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#hive-forge && ./result/bin/hive-forge markdown-docs > docs/2-handbook/reference/forge-cli.md" >&2
|
||||
echo "ERROR: docs/2-handbook/tools/forge-cli.md is out of date — regenerate it:" >&2
|
||||
echo " nix build .#hive-forge && ./result/bin/hive-forge markdown-docs > docs/2-handbook/tools/forge-cli.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
touch "$out"
|
||||
|
|
|
|||
Loading…
Reference in a new issue