add version command to cli

This commit is contained in:
Josh Wolf
2021-11-11 13:52:15 -07:00
parent 933af22907
commit 83d989ab85
11 changed files with 126 additions and 69 deletions

View File

@@ -3,6 +3,10 @@ before:
hooks:
- go mod tidy
- go mod download
env:
- vpkg=github.com/rancherfederal/hauler/pkg/version
builds:
- main: cmd/hauler/main.go
goos:
@@ -12,6 +16,8 @@ builds:
goarch:
- amd64
- arm64
ldflags:
- -s -w -X {{ .Env.vpkg }}.GitVersion={{ .Version }} -X {{ .Env.vpkg }}.commit={{ .ShortCommit }} -X {{ .Env.vpkg }}.buildDate={{ .Date }}
env:
- CGO_ENABLED=0