Skip to content

Commit

Permalink
Merge pull request #340 from jottofar/fix-help
Browse files Browse the repository at this point in the history
Bug 1810310: fix examples in help
  • Loading branch information
openshift-merge-robot committed Mar 6, 2020
2 parents 4b7e738 + 775ee8d commit 8ce6126
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions pkg/cli/admin/release/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func NewExtract(f kcmdutil.Factory, parentName string, streams genericclioptions
any destructive actions on your behalf except for executing a 'git checkout' which
may change the current branch. Requires 'git' to be on your path.
`),
Example: templates.Examples(`
Example: templates.Examples(fmt.Sprintf(`
# Use git to check out the source code for the current cluster release to DIR
%[1]s --git=DIR
`),
%[1]s extract --git=DIR
`, parentName)),
Run: func(cmd *cobra.Command, args []string) {
kcmdutil.CheckErr(o.Complete(f, cmd, args))
kcmdutil.CheckErr(o.Run())
Expand Down
12 changes: 6 additions & 6 deletions pkg/cli/admin/release/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ func NewInfo(f kcmdutil.Factory, parentName string, streams genericclioptions.IO
the code changes that occurred between the two release arguments. This operation is slow
and requires sufficient disk space on the selected drive to clone all repositories.
`),
Example: templates.Examples(`
Example: templates.Examples(fmt.Sprintf(`
# Show information about the cluster's current release
%[1]s
%[1]s info
# Show the source code that comprises a release
%[1]s 4.2.2 --commit-urls
%[1]s info 4.2.2 --commit-urls
# Show the source code difference between two releases
%[1]s 4.2.0 4.2.2 --commits
%[1]s info 4.2.0 4.2.2 --commits
# Show where the images referenced by the release are located
%[1]s quay.io/openshift-release-dev/ocp-release:4.2.2 --pullspecs
%[1]s info quay.io/openshift-release-dev/ocp-release:4.2.2 --pullspecs
`),
`, parentName)),
Run: func(cmd *cobra.Command, args []string) {
kcmdutil.CheckErr(o.Complete(f, cmd, args))
kcmdutil.CheckErr(o.Validate())
Expand Down
12 changes: 6 additions & 6 deletions pkg/cli/admin/release/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ func NewMirror(f kcmdutil.Factory, parentName string, streams genericclioptions.
the file:// prefix to the --to flag. The command will print the 'oc image mirror' command
that can be used to upload the release to another registry.
`),
Example: templates.Examples(`
Example: templates.Examples(fmt.Sprintf(`
# Perform a dry run showing what would be mirrored, including the mirror objects
%[1]s 4.2.2 --to myregistry.local/openshift/release --dry-run
%[1]s mirror 4.2.2 --to myregistry.local/openshift/release --dry-run
# Mirror a release into the current directory
%[1]s 4.2.2 --to file://openshift/release
%[1]s mirror 4.2.2 --to file://openshift/release
# Mirror a release to another directory in the default location
%[1]s 4.2.2 --to-dir /tmp/releases
%[1]s mirror 4.2.2 --to-dir /tmp/releases
# Upload a release from the current directory to another server
%[1]s --from file://openshift/release --to myregistry.com/openshift/release
`),
%[1]s mirror --from file://openshift/release --to myregistry.com/openshift/release
`, parentName)),
Run: func(cmd *cobra.Command, args []string) {
kcmdutil.CheckErr(o.Complete(cmd, f, args))
kcmdutil.CheckErr(o.Run())
Expand Down

0 comments on commit 8ce6126

Please sign in to comment.