-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yaml
116 lines (109 loc) · 4.03 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: 2
project_name: ldcli
env:
- GO111MODULE=on # Ensure we aren't using anything in GOPATH when building
- CGO_ENABLED=1 # Needed for SQLite support
- DOCKER_CLI_EXPERIMENTAL=enabled # This is on by default in docker versions >= 20.10
# Paths to compiler toolchains for each target OS/ARCH. If new items are added to GOOS/GOACH in the build,
# they should also be added here.
# In the future we can use musl for w64-mingw32 too, currently missing is only aarch64.
- CC_windows_386=/llvm-mingw/bin/i686-w64-mingw32-gcc
- CXX_windows_386=/llvm-mingw/bin/i686-w64-mingw32-g++
- CC_windows_amd64=/llvm-mingw/bin/x86_64-w64-mingw32-gcc
- CXX_windows_amd64=/llvm-mingw/bin/x86_64-w64-mingw32-g++
- CC_windows_arm64=/llvm-mingw/bin/aarch64-w64-mingw32-gcc
- CXX_windows_arm64=/llvm-mingw/bin/aarch64-w64-mingw32-g++
- CC_linux_386=/musl/bin/i686-linux-musl-gcc
- CXX_linux_386=/musl/bin/i686-linux-musl-g++
- CC_linux_amd64=/musl/bin/x86_64-linux-musl-gcc
- CXX_linux_amd64=/musl/bin/x86_64-linux-musl-g++
- CC_linux_arm64=/musl/bin/aarch64-linux-musl-gcc
- CXX_linux_arm64=/musl/bin/aarch64-linux-musl-g++
- CC_darwin_amd64=/usr/local/osxcross/bin/o64-clang
- CXX_darwin_amd64=/usr/local/osxcross/bin/o64-clang++
- CC_darwin_arm64=/usr/local/osxcross/bin/oa64-clang
- CXX_darwin_arm64=/usr/local/osxcross/bin/oa64-clang++
builds:
- id: ldcli
binary: ldcli
goos:
- darwin
- linux
- windows
goarch:
- "386"
- amd64
- arm64
ldflags:
- -s # Omit all symbol information to minimize binary size
- -w # Omit DWARF to minimize binary size
- -X 'main.version={{.Version}}'
- '{{ if eq .Os "linux" }}-extldflags "-static"{{ end }}'
ignore:
- goos: darwin
goarch: "386"
env:
# The below environment variables set up the c compiler toolchain for CGO.
# Templates are used to vary the toolchain based on OS & platform.
# The real values are defined by the CC_<OS>_<ARCH> env vars defined at the top `env` attribute.
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
dockers:
# AMD64
- image_templates:
- "launchdarkly/ldcli:{{ .Version }}-amd64"
- "launchdarkly/ldcli:v{{ .Major }}-amd64"
- "launchdarkly/ldcli:latest-amd64"
goos: linux
goarch: amd64
dockerfile: Dockerfile.goreleaser
skip_push: false
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
# ARM64v8
- image_templates:
- "launchdarkly/ldcli:{{ .Version }}-arm64v8"
- "launchdarkly/ldcli:v{{ .Major }}-arm64v8"
- "launchdarkly/ldcli:latest-arm64v8"
goos: linux
goarch: arm64
dockerfile: Dockerfile.goreleaser
skip_push: false
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: "launchdarkly/ldcli:{{ .Version}}"
skip_push: false
image_templates:
- "launchdarkly/ldcli:{{ .Version }}-amd64"
- "launchdarkly/ldcli:{{ .Version }}-arm64v8"
- name_template: "launchdarkly/ldcli:v{{ .Major }}"
skip_push: false
image_templates:
- "launchdarkly/ldcli:v{{ .Major }}-amd64"
- "launchdarkly/ldcli:v{{ .Major }}-arm64v8"
- name_template: "launchdarkly/ldcli:latest"
skip_push: false
image_templates:
- "launchdarkly/ldcli:latest-amd64"
- "launchdarkly/ldcli:latest-arm64v8"
brews:
- name: ldcli
description: "The official command line interface for managing LaunchDarkly feature flags."
homepage: "https://launchdarkly.com"
repository:
owner: launchdarkly
name: homebrew-tap
branch: master
git:
url: [email protected]:launchdarkly/homebrew-tap.git
private_key: "{{ .Env.HOMEBREW_DEPLOY_KEY }}"
directory: Formula
url_template: "https://github.com/launchdarkly/ldcli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
install: |
bin.install "ldcli"
commit_author:
name: LaunchDarklyReleaseBot
email: [email protected]