Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Generate main commands page #360

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tools/parse_main.sh
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions tools/refresh-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions versioned_docs/version-1.1/commands/use_oras_cli.mdx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
---
title: Use the ORAS command line
sidebar_position: 0
warning: Do NOT modify this generated file
---

# Use the ORAS command line

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:
Expand Down
13 changes: 7 additions & 6 deletions versioned_docs/version-1.2/commands/use_oras_cli.mdx
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
---
title: Use the ORAS command line
sidebar_position: 0
warning: Do NOT modify this generated file
---

# Use the ORAS command line

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:
Expand Down