This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
.goreleaser.yaml
68 lines (68 loc) · 2.5 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
67
68
# Make sure to check the documentation at https://goreleaser.com
env:
- SNAPSHOT={{ if index .Env "SNAPSHOT" }}{{ .Env.SNAPSHOT }}{{ else }}false{{ end }}
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 github.com/elastic/elastic-agent-shipper/tools.commit={{.Commit}} -X github.com/elastic/elastic-agent-shipper/tools.buildTime={{.Date}} -X github.com/elastic/elastic-agent-shipper/tools.snapshot={{ .Env.SNAPSHOT }}
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 github.com/elastic/elastic-agent-shipper/tools.commit={{.Commit}} -X github.com/elastic/elastic-agent-shipper/tools.buildTime={{.Date}} -X github.com/elastic/elastic-agent-shipper/tools.snapshot={{ .Env.SNAPSHOT }}
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 github.com/elastic/elastic-agent-shipper/tools.commit={{.Commit}} -X github.com/elastic/elastic-agent-shipper/tools.buildTime={{.Date}} -X github.com/elastic/elastic-agent-shipper/tools.snapshot={{ .Env.SNAPSHOT }}
gcflags:
- '{{ if eq .Env.DEV "true" }}all=-N -l{{ end }}'
changelog:
skip: true
dist: build/binaries