From 58fcdb011e92cfdbe092144a91eeb78744cb44b8 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Thu, 27 Jun 2024 06:08:08 -0600 Subject: [PATCH] chore: Generate main commands page Signed-off-by: Terry Howe --- tools/parse_main.sh | 16 ++++++++++++++++ tools/refresh-commands.sh | 1 + .../version-1.1/commands/use_oras_cli.mdx | 12 ++++++------ .../version-1.2/commands/use_oras_cli.mdx | 13 +++++++------ 4 files changed, 30 insertions(+), 12 deletions(-) create mode 100755 tools/parse_main.sh diff --git a/tools/parse_main.sh b/tools/parse_main.sh new file mode 100755 index 00000000..222451cc --- /dev/null +++ b/tools/parse_main.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +echo '---' +echo "title: Use the ORAS command line" +echo "sidebar_position: 0" +echo 'warning: Do NOT modify this generated file' +echo '---' +echo +echo '# Use the ORAS command line' +echo +echo 'To list available commands, either run `oras` with no parameters or execute `oras help`:' +echo +echo '```' +cat +echo '```' +echo diff --git a/tools/refresh-commands.sh b/tools/refresh-commands.sh index 36aab538..962eeb05 100755 --- a/tools/refresh-commands.sh +++ b/tools/refresh-commands.sh @@ -60,6 +60,7 @@ do ORAS_COMMAND=$(./tools/install.sh ${LATEST_VERSION} ${TEMPDIR}) WEIGHT=10 VERSIONED_DOCS=versioned_docs/version-${VERSION}/commands + ${ORAS_COMMAND} help | ./tools/parse_main.sh >"${VERSIONED_DOCS}/use_oras_cli.mdx" list_commands >"${TEMPDIR}/commands" while read COMMAND do diff --git a/versioned_docs/version-1.1/commands/use_oras_cli.mdx b/versioned_docs/version-1.1/commands/use_oras_cli.mdx index 460d9b3a..4cd6dab6 100644 --- a/versioned_docs/version-1.1/commands/use_oras_cli.mdx +++ b/versioned_docs/version-1.1/commands/use_oras_cli.mdx @@ -1,6 +1,7 @@ --- title: Use the ORAS command line sidebar_position: 0 +warning: Do NOT modify this generated file --- # Use the ORAS command line @@ -8,24 +9,23 @@ sidebar_position: 0 To list available commands, either run `oras` with no parameters or execute `oras help`: ``` -$ oras Usage: oras [command] Available Commands: - attach Attach files to an existing artifact + attach [Preview] Attach files to an existing artifact blob Blob operations completion Generate the autocompletion script for the specified shell cp Copy artifacts from one target to another - discover Discover referrers of a manifest in the remote registry + discover [Preview] Discover referrers of a manifest in a registry or an OCI image layout help Help about any command login Log in to a remote registry logout Log out from a remote registry manifest Manifest operations - pull Pull files from remote registry - push Push files to remote registry + pull Pull files from a registry or an OCI image layout + push Push files to a registry or an OCI image layout repo Repository operations - tag Tag a manifest in the remote registry + tag Tag a manifest in a registry or an OCI image layout version Show the oras version information Flags: diff --git a/versioned_docs/version-1.2/commands/use_oras_cli.mdx b/versioned_docs/version-1.2/commands/use_oras_cli.mdx index 460d9b3a..bccd8d4c 100644 --- a/versioned_docs/version-1.2/commands/use_oras_cli.mdx +++ b/versioned_docs/version-1.2/commands/use_oras_cli.mdx @@ -1,6 +1,7 @@ --- title: Use the ORAS command line sidebar_position: 0 +warning: Do NOT modify this generated file --- # Use the ORAS command line @@ -8,24 +9,24 @@ sidebar_position: 0 To list available commands, either run `oras` with no parameters or execute `oras help`: ``` -$ oras Usage: oras [command] Available Commands: - attach Attach files to an existing artifact + attach [Preview] Attach files to an existing artifact blob Blob operations completion Generate the autocompletion script for the specified shell cp Copy artifacts from one target to another - discover Discover referrers of a manifest in the remote registry + discover [Preview] Discover referrers of a manifest in a registry or an OCI image layout help Help about any command login Log in to a remote registry logout Log out from a remote registry manifest Manifest operations - pull Pull files from remote registry - push Push files to remote registry + pull Pull files from a registry or an OCI image layout + push Push files to a registry or an OCI image layout repo Repository operations - tag Tag a manifest in the remote registry + resolve [Experimental] Resolves digest of the target artifact + tag Tag a manifest in a registry or an OCI image layout version Show the oras version information Flags: