Skip to content

Commit 8ede222

Browse files
authored
fix(goreleaser): add darwin with CGO enabled and remove static to gorelease (#23457)
Signed-off-by: rumstead <[email protected]>
1 parent e25123b commit 8ede222

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

.goreleaser.yaml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,36 @@ builds:
2121
- -X github.com/argoproj/argo-cd/v3/common.gitCommit={{ .FullCommit }}
2222
- -X github.com/argoproj/argo-cd/v3/common.gitTreeState={{ .Env.GIT_TREE_STATE }}
2323
- -X github.com/argoproj/argo-cd/v3/common.kubectlVersion={{ .Env.KUBECTL_VERSION }}
24-
- -extldflags="-static"
24+
- '{{ if or (eq .Runtime.Goos "linux") (eq .Runtime.Goos "windows") }}-extldflags="-static"{{ end }}'
2525
goos:
2626
- linux
2727
- windows
28+
- darwin
2829
goarch:
2930
- amd64
3031
- arm64
3132
- s390x
3233
- ppc64le
3334
ignore:
35+
- goos: darwin
36+
goarch: s390x
37+
- goos: darwin
38+
goarch: ppc64le
3439
- goos: windows
3540
goarch: s390x
3641
- goos: windows
3742
goarch: ppc64le
3843
- goos: windows
3944
goarch: arm64
40-
- id: argocd-cli-darwin
41-
main: ./cmd
42-
binary: argocd-{{ .Os}}-{{ .Arch}}
43-
env:
44-
- CGO_ENABLED=1
45-
flags:
46-
- -v
47-
ldflags:
48-
- -X github.com/argoproj/argo-cd/v3/common.version={{ .Version }}
49-
- -X github.com/argoproj/argo-cd/v3/common.buildDate={{ .Date }}
50-
- -X github.com/argoproj/argo-cd/v3/common.gitCommit={{ .FullCommit }}
51-
- -X github.com/argoproj/argo-cd/v3/common.gitTreeState={{ .Env.GIT_TREE_STATE }}
52-
- -X github.com/argoproj/argo-cd/v3/common.kubectlVersion={{ .Env.KUBECTL_VERSION }}
53-
- -extldflags="-static"
54-
goos:
55-
- darwin
56-
goarch:
57-
- amd64
58-
- arm64
45+
overrides:
46+
- goos: darwin
47+
goarch: amd64
48+
env:
49+
- CGO_ENABLED=1
50+
- goos: darwin
51+
goarch: arm64
52+
env:
53+
- CGO_ENABLED=1
5954

6055
archives:
6156
- id: argocd-archive

0 commit comments

Comments
 (0)