File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ builds:
2222 flags :
2323 - -trimpath
2424 ldflags :
25- - -s -w -X github.com/obay/hscli/cmd.version={{.Version}} -X github.com/obay/hscli/cmd.commit={{.Commit}} -X github.com/obay/hscli/cmd.buildDate={{.Date}}
25+ - -s -w -X github.com/obay/hscli/cmd.version={{.Version}}
2626
2727archives :
2828 - id : versioned
Original file line number Diff line number Diff line change 11package cmd
22
33import (
4- "fmt"
54 "os"
65
76 "github.com/spf13/cobra"
@@ -55,7 +54,5 @@ func initConfig() {
5554 viper .BindEnv ("api-key" , "HUBSPOT_API_KEY" )
5655
5756 // If a config file is found, read it in.
58- if err := viper .ReadInConfig (); err == nil {
59- fmt .Fprintln (os .Stderr , "Using config file:" , viper .ConfigFileUsed ())
60- }
57+ viper .ReadInConfig ()
6158}
Original file line number Diff line number Diff line change @@ -2,16 +2,13 @@ package cmd
22
33import (
44 "fmt"
5- "runtime"
65
76 "github.com/spf13/cobra"
87)
98
109var (
11- // These will be set by the build process using ldflags
12- version = "dev"
13- commit = "unknown"
14- buildDate = "unknown"
10+ // This will be set by the build process using ldflags
11+ version = "dev"
1512)
1613
1714// versionCmd represents the version command
@@ -21,10 +18,6 @@ var versionCmd = &cobra.Command{
2118 Long : `Print the version number and build information of hscli.` ,
2219 Run : func (cmd * cobra.Command , args []string ) {
2320 fmt .Printf ("hscli version %s\n " , version )
24- fmt .Printf ("Commit: %s\n " , commit )
25- fmt .Printf ("Build Date: %s\n " , buildDate )
26- fmt .Printf ("Go Version: %s\n " , runtime .Version ())
27- fmt .Printf ("Platform: %s/%s\n " , runtime .GOOS , runtime .GOARCH )
2821 },
2922}
3023
You can’t perform that action at this time.
0 commit comments