Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (r rootCmd) Subcommands() []cli.Command {
&rmcmd{gf: &r.globalFlags},
&proxycmd{},
&chromeExtInstall{},
&versioncmd{},
}
}

Expand Down
23 changes: 23 additions & 0 deletions versionmd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"flag"
"fmt"

"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


type versioncmd struct {}

func (v *versioncmd) Spec() cli.CommandSpec {
return cli.CommandSpec{
Name: "version",
Desc: fmt.Sprintf("Retrieve the current version."),
}
}

func (v *versioncmd) Run(fl *flag.FlagSet) {
fmt.Println(version)
}