-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
52 lines (52 loc) · 1.42 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
# Documentation at https://goreleaser.com
version: 2
before:
hooks:
- bash -c "test -f {{.Env.UI_FILE}} || make build-web UI_FILE={{.Env.UI_FILE}}"
dist: .tmp/dist
builds:
- binary: client-application
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm
- arm64
- "386"
- ppc64
- ppc64le
goarm:
- "7"
main: ./cmd
ldflags:
- -s -w -X main.ReleaseURL={{.ReleaseURL}}
- -s -w -X main.CommitDate={{.CommitDate}}
- -s -w -X main.CommitHash={{.ShortCommit}}
- -s -w -X main.BuildDate={{.Date}}
- -s -w -X main.Version={{.Version}}
- -s -w -X main.UISeparator={{.Env.UI_SEPARATOR}}
- -extldflags '-static'
hooks:
post:
- bash -c "test {{.Os}} == "windows" || test {{.Os}} == "darwin" || upx --best --lzma {{.Path}}"
- make inject-web CLIENT_APPLICATION_BINARY_PATH={{.Path}} UI_SEPARATOR={{.Env.UI_SEPARATOR}} UI_FILE={{.Env.UI_FILE}}
archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{.Os}}{{ end }}_{{ if eq .Arch "386"}}i{{ end }}{{ .Arch }}'
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"