add goreleaser

This commit is contained in:
sentriz
2019-06-12 11:00:55 +01:00
parent 33476aa77f
commit 345cdc590c
2 changed files with 41 additions and 0 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ cmd/server/server
cmd/scanner/main
cmd/server/main
_test*
dist

40
.goreleaser.yml Normal file
View File

@@ -0,0 +1,40 @@
env:
- GO111MODULE=on
before:
hooks:
- go mod download
builds:
- id: scanner
env:
- CGO_ENABLED=1
main: ./cmd/scanner/main.go
flags:
- -tags='sqlite foreign_keys'
ldflags:
- "-extldflags '-static'"
- -s -w -X main.build={{.Version}}
- ./usemsan=-msan
goos:
- linux
goarch:
- amd64
- 386
archives:
- replacements:
darwin: darwin
linux: linux
windows: windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
disable: true