forked from elastic/elastic-agent-shipper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
66 lines (66 loc) · 2.06 KB
/
.goreleaser.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- id: darwin
binary: '{{ .ProjectName }}-{{ .Env.DEFAULT_VERSION }}-{{ .Os }}-{{ if eq .Arch "amd64" }}x86_64{{ end }}{{ if eq .Arch "arm64" }}aarch64{{ end }}/{{ .ProjectName }}'
goos:
- darwin
goarch:
- amd64
- arm64
flags:
- -buildmode=pie
ldflags:
- '{{ if eq .Env.DEV "false" }}-s -w{{ end }}'
- -X main.Version={{ .Env.DEFAULT_VERSION }} -X main.Commit={{.Commit}} -X main.BuildTime={{.Date}}
gcflags:
- '{{ if eq .Env.DEV "true" }}all=-N -l{{ end }}'
no_unique_dist_dir: true
- id: linux
binary: '{{ .ProjectName }}-{{ .Env.DEFAULT_VERSION }}-{{ .Os }}-{{ if eq .Arch "amd64" }}x86_64{{ end }}{{ if eq .Arch "386" }}x86{{ end }}{{ if eq .Arch "arm64" }}{{ .Arch }}{{ end }}/{{ .ProjectName }}'
goos:
- linux
goarch:
- amd64
- arm64
- 386
no_unique_dist_dir: true
ldflags:
- '{{ if eq .Env.DEV "false" }}-s -w{{end}}'
- -X main.Version={{ .Env.DEFAULT_VERSION }} -X main.Commit={{.Commit}} -X main.BuildTime={{.Date}}
gcflags:
- '{{ if eq .Env.DEV "true" }}all=-N -l{{ end }}'
overrides:
- goos: linux
goarch: amd64
goarm: ''
gomips: ''
flags:
- -buildmode=pie
- goos: linux
goarch: arm64
goarm: ''
gomips: ''
flags:
- -buildmode=pie
- id: windows
binary: '{{ .ProjectName }}-{{ .Env.DEFAULT_VERSION }}-{{ .Os }}-{{ if eq .Arch "amd64" }}x86_64{{ end }}{{ if eq .Arch "386" }}x86{{ end }}/{{ .ProjectName }}'
goos:
- windows
goarch:
- amd64
- 386
no_unique_dist_dir: true
flags:
- -buildmode=pie
ldflags:
- '{{ if eq .Env.DEV "false" }}-s -w{{ end }}'
- -X main.Version={{ .Env.DEFAULT_VERSION }} -X main.Commit={{.Commit}} -X main.BuildTime={{.Date}}
gcflags:
- '{{ if eq .Env.DEV "true" }}all=-N -l{{ end }}'
changelog:
skip: true
dist: build/binaries