From dd0d7edeb497e65f91fdb2d7114fe641608b7491 Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Fri, 13 Dec 2024 11:29:13 -0800 Subject: [PATCH] chore: Truncate flag listing in favor of docs We have a full example in the docs. Let's not break the output formatting so thoroughly. --- commands/release/create/create.go | 2 +- commands/release/upload/upload.go | 2 +- docs/source/release/create.md | 18 +++++++++--------- docs/source/release/upload.md | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/commands/release/create/create.go b/commands/release/create/create.go index e3bf0e81e..c547fe986 100644 --- a/commands/release/create/create.go +++ b/commands/release/create/create.go @@ -179,7 +179,7 @@ func NewCmdCreate(f *cmdutils.Factory) *cobra.Command { cmd.Flags().StringVarP(&opts.NotesFile, "notes-file", "F", "", "Read release notes 'file'. Specify '-' as the value to read from stdin.") cmd.Flags().StringVarP(&opts.ReleasedAt, "released-at", "D", "", "The 'date' when the release was ready. Defaults to the current datetime. Expects ISO 8601 format (2019-03-15T08:00:00Z).") cmd.Flags().StringSliceVarP(&opts.Milestone, "milestone", "m", []string{}, "The title of each milestone the release is associated with.") - cmd.Flags().StringVarP(&opts.AssetLinksAsJson, "assets-links", "a", "", "'JSON' string representation of assets links, like `--assets-links='[{\"name\": \"Asset1\", \"url\":\"https:///some/location/1\", \"link_type\": \"other\", \"direct_asset_path\": \"path/to/file\"}]'.`") + cmd.Flags().StringVarP(&opts.AssetLinksAsJson, "assets-links", "a", "", "JSON string representation of assets links, with these fields: name, URL, link_type, direct_asset_path.") cmd.Flags().BoolVar(&opts.PublishToCatalog, "publish-to-catalog", false, "[EXPERIMENTAL] Publish the release to the GitLab CI/CD catalog.") return cmd diff --git a/commands/release/upload/upload.go b/commands/release/upload/upload.go index 967ffd263..6f77ef222 100644 --- a/commands/release/upload/upload.go +++ b/commands/release/upload/upload.go @@ -107,7 +107,7 @@ func NewCmdUpload(f *cmdutils.Factory) *cobra.Command { }, } - cmd.Flags().StringVarP(&opts.AssetLinksAsJson, "assets-links", "a", "", "`JSON` string representation of assets links, like: `--assets-links='[{\"name\": \"Asset1\", \"url\":\"https:///some/location/1\", \"link_type\": \"other\", \"direct_asset_path\": \"path/to/file\"}]'.`") + cmd.Flags().StringVarP(&opts.AssetLinksAsJson, "assets-links", "a", "", "JSON string representation of assets links, with these fields: name, URL, link_type, direct_asset_path.") return cmd } diff --git a/docs/source/release/create.md b/docs/source/release/create.md index 8339d1595..e2a556bd4 100644 --- a/docs/source/release/create.md +++ b/docs/source/release/create.md @@ -89,15 +89,15 @@ $ glab release create v1.0.1 --publish-to-catalog ## Options ```plaintext - -a, --assets-links --assets-links='[{"name": "Asset1", "url":"https:///some/location/1", "link_type": "other", "direct_asset_path": "path/to/file"}]'. 'JSON' string representation of assets links, like --assets-links='[{"name": "Asset1", "url":"https:///some/location/1", "link_type": "other", "direct_asset_path": "path/to/file"}]'. - -m, --milestone strings The title of each milestone the release is associated with. - -n, --name string The release name or title. - -N, --notes string The release notes or description. You can use Markdown. - -F, --notes-file string Read release notes 'file'. Specify '-' as the value to read from stdin. - --publish-to-catalog [EXPERIMENTAL] Publish the release to the GitLab CI/CD catalog. - -r, --ref string If the specified tag doesn't exist, the release is created from ref and tagged with the specified tag name. It can be a commit SHA, another tag name, or a branch name. - -D, --released-at string The 'date' when the release was ready. Defaults to the current datetime. Expects ISO 8601 format (2019-03-15T08:00:00Z). - -T, --tag-message string Message to use if creating a new annotated tag. + -a, --assets-links string JSON string representation of assets links, with these fields: name, URL, link_type, direct_asset_path. + -m, --milestone strings The title of each milestone the release is associated with. + -n, --name string The release name or title. + -N, --notes string The release notes or description. You can use Markdown. + -F, --notes-file string Read release notes 'file'. Specify '-' as the value to read from stdin. + --publish-to-catalog [EXPERIMENTAL] Publish the release to the GitLab CI/CD catalog. + -r, --ref string If the specified tag doesn't exist, the release is created from ref and tagged with the specified tag name. It can be a commit SHA, another tag name, or a branch name. + -D, --released-at string The 'date' when the release was ready. Defaults to the current datetime. Expects ISO 8601 format (2019-03-15T08:00:00Z). + -T, --tag-message string Message to use if creating a new annotated tag. ``` ## Options inherited from parent commands diff --git a/docs/source/release/upload.md b/docs/source/release/upload.md index 862476f66..c232faac6 100644 --- a/docs/source/release/upload.md +++ b/docs/source/release/upload.md @@ -55,7 +55,7 @@ $ glab release upload v1.0.1 --assets-links=' ## Options ```plaintext - -a, --assets-links JSON JSON string representation of assets links, like: `--assets-links='[{"name": "Asset1", "url":"https:///some/location/1", "link_type": "other", "direct_asset_path": "path/to/file"}]'.` + -a, --assets-links string JSON string representation of assets links, with these fields: name, URL, link_type, direct_asset_path. ``` ## Options inherited from parent commands -- GitLab