-
Notifications
You must be signed in to change notification settings - Fork 21
/
.goreleaser.yml
44 lines (44 loc) · 1.11 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
before:
hooks:
- go mod download
builds:
- binary: lxe
main: cmd/lxe/main.go
env:
- GO111MODULE=on
- CGO_ENABLED=0
# Can't we have a named template which offers us the module name of that current binary?
- GO_MODULENAME=github.com/automaticserver/lxe
goos:
- linux
goarch:
- 386
- amd64
- arm
- arm64
flags:
- -trimpath
ldflags:
- -s -w
- -X "{{.Env.GO_MODULENAME}}/cli/version.Version={{replace .Version (print "-" .ShortCommit) ""}}"
- -X "{{.Env.GO_MODULENAME}}/cli/version.GitCommit={{.FullCommit}}"
- -X "{{.Env.GO_MODULENAME}}/cli/version.BuildDate={{time "Mon, 02 Jan 2006 15:04:05 -0700"}}"
- -X "{{.Env.GO_MODULENAME}}/cli/version.PackageName={{.ProjectName}}"
archives:
- wrap_in_directory: true
replacements:
386: i386
files:
- README*
- COPYING
- AUTHORS
- doc/*
- fixtures/hostnetwork*
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: 0.0.0-{{.ShortCommit}}
changelog:
sort: asc
release:
name_template: "{{toupper .ProjectName}} {{.Version}}"