File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 99
1010# release:
1111# gox -output "dist/sqlvet_{{.OS}}_{{.Arch}}" \
12+ # -ldflags "-X main.gitCommit=`git rev-list -1 HEAD`" \
1213# -osarch="linux/amd64" \
1314# -osarch="windows/amd64" \
1415# -osarch="freebsd/amd64" \
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818const version = "1.1.1"
1919
2020var (
21+ gitCommit = "?"
2122 flagErrFormat = false
2223)
2324
@@ -132,7 +133,7 @@ func main() {
132133 Use : "sqlvet PATH" ,
133134 Short : "Go fearless SQL" ,
134135 Args : cobra .ExactArgs (1 ),
135- Version : version ,
136+ Version : fmt . Sprintf ( "%s (%s)" , version , gitCommit ) ,
136137 PreRun : func (cmd * cobra.Command , args []string ) {
137138 if cli .Verbose {
138139 log .SetLevel (log .DebugLevel )
You can’t perform that action at this time.
0 commit comments