-
Notifications
You must be signed in to change notification settings - Fork 39
Added version flag #169
Added version flag #169
Conversation
Co-Authored-By: Nathan Potter <npotter@coder.com>
Co-Authored-By: Nathan Potter <npotter@coder.com>
Co-Authored-By: Nathan Potter <npotter@coder.com>
versionmd.go
Outdated
| } | ||
|
|
||
| func (v *versioncmd) Run(fl *flag.FlagSet) { | ||
| fmt.Printf("Sail version: %s", version) |
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.
This should just print the version so sail version can be more easily used in scripts.
versionmd.go
Outdated
| func (v *versioncmd) Spec() cli.CommandSpec { | ||
| return cli.CommandSpec{ | ||
| Name: "version", | ||
| Desc: fmt.Sprintf("Retrieve the current version"), |
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.
Should end with a period
versionmd.go
Outdated
| } | ||
|
|
||
| func (v *versioncmd) RegisterFlags(fl *flag.FlagSet) { | ||
| fl.BoolVar(&v.print, "print", false, "Print the current version of Sail") |
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.
| fl.BoolVar(&v.print, "print", false, "Print the current version of Sail") | |
| fl.BoolVar(&v.print, "print", false, "Print the current version") |
versionmd.go
Outdated
| var version string | ||
|
|
||
| type versioncmd struct { | ||
| print bool |
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.
I don't think this variable is used
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.
I thought that I was going to use it but did not. Will remove it.
| "go.coder.com/cli" | ||
| ) | ||
|
|
||
| var version string |
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.
where is this populated?
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.
ci/build.sh
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.
ahh, duh
|
@ammario All should be good now. |
|
@ammario should be good to merge |
Resolves #163