|
@@ -9,6 +9,8 @@ before:
|
|
|
builds:
|
|
|
- env:
|
|
|
- CGO_ENABLED=0
|
|
|
+ flags:
|
|
|
+ - -trimpath
|
|
|
goos:
|
|
|
- linux
|
|
|
- windows
|
|
@@ -21,12 +23,20 @@ builds:
|
|
|
ldflags:
|
|
|
- -s -w -X main.version={{.Tag}} -X main.buildTime={{.Date}}
|
|
|
archives:
|
|
|
- - replacements:
|
|
|
- darwin: Darwin
|
|
|
- linux: Linux
|
|
|
- windows: Windows
|
|
|
- 386: i386
|
|
|
- amd64: x86_64
|
|
|
+ # use zip for windows archives
|
|
|
+ - format_overrides:
|
|
|
+ - goos: windows
|
|
|
+ format: zip
|
|
|
+ # this name template makes the OS and Arch compatible with the results of uname.
|
|
|
+ name_template: >-
|
|
|
+ {{ .ProjectName }}_
|
|
|
+ {{- .Version }}_
|
|
|
+ {{- .Os }}_
|
|
|
+ {{- if eq .Arch "amd64" }}x86_64
|
|
|
+ {{- else if eq .Arch "386" }}i386
|
|
|
+ {{- else }}{{ .Arch }}{{ end }}
|
|
|
+ {{- if .Mips }}_{{ .Mips }}{{ end }}
|
|
|
+ {{- if .Arm }}v{{ .Arm }}{{ end }}
|
|
|
checksum:
|
|
|
name_template: 'checksums.txt'
|
|
|
snapshot:
|