Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Conversation

@teddy-codes
Copy link
Contributor

Resolves #163

versionmd.go Outdated
}

func (v *versioncmd) Run(fl *flag.FlagSet) {
fmt.Printf("Sail version: %s", version)
Copy link
Member

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"),
Copy link
Member

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

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

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this populated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci/build.sh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, duh

@teddy-codes
Copy link
Contributor Author

@ammario All should be good now.

@teddy-codes
Copy link
Contributor Author

@ammario should be good to merge

@ammario ammario merged commit a01aa56 into coder:master May 23, 2019
@teddy-codes teddy-codes deleted the version-flag branch May 23, 2019 18:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add version flag

2 participants