-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
'operator-sdk print-deps' command #772
Conversation
func NewPrintDepsCmd() *cobra.Command { | ||
printDepsCmd := &cobra.Command{ | ||
Use: "print-deps", | ||
Short: "Print dependencies expected by the Operator SDK", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Think this could be phrased a bit differently to avoid confusion, dependencies can also mean, the things we expect like requirements we depend on: e.g. dep itself, version of go, etc. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Print Golang packages and versions required to run the operator"
?
…mmand pkg/scaffold/gopkgtoml.go: printing utilities for print-deps
@estroz Can you follow this up by updating the CHANGELOG for the new cmd. |
### Flags | ||
|
||
* `--as-file` Print packages and versions in Gopkg.toml format. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@estroz Sorry for the late review but it might be good to have a truncated example output here for a particular version, as we do for other commands.
We can show the --as-file
output.
Description of the change: add an
operator-sdk print-deps
sub-command to print the most recent operator dependencies and versions. The sub-command will print pretty (below) by default, or the fullGopkg.toml
when passed the--as-file
flag.Motivation for the change: updating operator versions when upgrading to new binary versions requires looking at SDK source code. This command prints all version information for packages pre-defined by the SDK that can be copy and pasted into an operators'
Gopkg.toml
, or written over directly with the--as-file
flag.Sample of output:
Closes #638