chore: use codegen script for docs (#2352)

* chore: use codegen script for docs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: codegen updated docs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2024-06-11 15:25:48 +02:00 committed by GitHub
parent 1e7dd33251
commit f7451b1a9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 11 deletions

View File

@ -20,12 +20,11 @@ func config git remove
### Options
```
--delete-cluster Delete cluster resources (credentials and config on the cluster).
--delete-local Delete local resources (pipeline templates).
-h, --help help for remove
-n, --namespace string Deploy into a specific namespace. Will use function's current namespace by default if already deployed, and the currently active namespace if it can be determined. ($FUNC_NAMESPACE)
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
--delete-cluster Delete cluster resources (credentials and config on the cluster).
--delete-local Delete local resources (pipeline templates).
-h, --help help for remove
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -25,7 +25,7 @@ func delete <name>
func delete
# Undeploy the function 'myfunc' in namespace 'apps'
func delete -n apps myfunc
func delete myfunc --namespace apps
```
@ -35,7 +35,7 @@ func delete -n apps myfunc
-a, --all string Delete all resources created for a function, eg. Pipelines, Secrets, etc. ($FUNC_ALL) (allowed values: "true", "false") (default "true")
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
-h, --help help for delete
-n, --namespace string The namespace in which to delete. ($FUNC_NAMESPACE)
-n, --namespace string The namespace when deleting by name. ($FUNC_NAMESPACE) (default "default")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```

View File

@ -125,7 +125,7 @@ func deploy
-g, --git-url string Repository url containing the function to build ($FUNC_GIT_URL)
-h, --help help for deploy
-i, --image string Full image name in the form [registry]/[namespace]/[name]:[tag]@[digest]. This option takes precedence over --registry. Specifying digest is optional, but if it is given, 'build' and 'push' phases are disabled. ($FUNC_IMAGE)
-n, --namespace string Deploy into a specific namespace. Will use function's current namespace by default if already deployed, and the currently active namespace if it can be determined. ($FUNC_NAMESPACE)
-n, --namespace string Deploy into a specific namespace. Will use the function's current namespace by default if already deployed, and the currently active context if it can be determined. ($FUNC_NAMESPACE) (default "default")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
--platform string Optionally specify a specific platform to build for (e.g. linux/amd64). ($FUNC_PLATFORM)
-u, --push Push the function image to registry before deploying. ($FUNC_PUSH) (default true)

View File

@ -30,7 +30,7 @@ func describe --output yaml --path myotherfunc
```
-h, --help help for describe
-n, --namespace string The namespace in which to look for the named function. ($FUNC_NAMESPACE)
-n, --namespace string The namespace in which to look for the named function. ($FUNC_NAMESPACE) (default "default")
-o, --output string Output format (human|plain|json|xml|yaml|url) ($FUNC_OUTPUT) (default "human")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)

View File

@ -6,7 +6,7 @@ List deployed functions
List deployed functions
Lists all deployed functions in a given namespace.
Lists deployed functions.
```

View File

@ -20,5 +20,7 @@ set -o pipefail
source "$(go run knative.dev/hack/cmd/script library.sh)"
go run ${REPO_ROOT_DIR}/docs/generator/main.go
# Make sure our dependencies are up-to-date
${REPO_ROOT_DIR}/hack/update-deps.sh

View File

@ -30,11 +30,13 @@ trap "cleanup" EXIT SIGINT
# Save working tree state
cp -aR "${REPO_ROOT_DIR}/go.sum" "${TMP_DIFFROOT}"
cp -aR "${REPO_ROOT_DIR}/docs/" "${TMP_DIFFROOT}"
"${REPO_ROOT_DIR}/hack/update-codegen.sh"
echo "Diffing ${REPO_ROOT_DIR} against freshly generated codegen"
ret=0
diff -Nupr --no-dereference "${REPO_ROOT_DIR}/go.sum" "${TMP_DIFFROOT}/go.sum" || ret=1
diff -Nupr --no-dereference "${REPO_ROOT_DIR}/docs/" "${TMP_DIFFROOT}/docs/" || ret=1
# Restore working tree state
rm -fr "${REPO_ROOT_DIR}/go.sum"