File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ SHELL =/bin/sh
2+
3+ dist :
4+ goreleaser check
5+ goreleaser release --snapshot --clean
6+ .PHONY : dist
7+
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ import (
1515 "google.golang.org/api/sheets/v4"
1616)
1717
18- var build = ""
18+ var (
19+ build = ""
20+ version = ""
21+ )
1922
2023var exepath = filepath .Dir (os .Args [0 ])
2124
2528 "this will trigger reauthentication" )
2629 jobConfig = flag .String ("job" , "" , "configuration `file` with job definition" )
2730 consoleAuth = flag .Bool ("console" , false , "use text authentication prompts instead of opening browser" )
28- version = flag .Bool ("version" , false , "print program version and quit" )
31+ ver = flag .Bool ("version" , false , "print program version and quit" )
2932
3033 defaultCredentialsFile = filepath .Join (exepath , ".refresh-credentials.json" )
3134 credentials = flag .String ("auth" , defaultCredentialsFile , "file with authentication data" )
@@ -41,8 +44,8 @@ func mustStr(s string, err error) string {
4144func main () {
4245 flag .Parse ()
4346
44- if * version {
45- fmt .Println ( build )
47+ if * ver {
48+ fmt .Printf ( "%s (%s)" , version , build )
4649 os .Exit (0 )
4750 }
4851
You can’t perform that action at this time.
0 commit comments