* Replaced initial node.js prototype of CLI with proper Go implementation * Added code signing for CLI + server binaries for macOS
21 lines
320 B
Go
21 lines
320 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func VersionCommand(version string) *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the CLI version",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if version == "" {
|
|
version = "dev"
|
|
}
|
|
fmt.Println(version)
|
|
},
|
|
}
|
|
}
|