Release fleetctl for macOS as a universal binary (native support for both amd64 and arm64 architectures). (#16346)

Release fleetctl for macOS as a universal binary (native support for
both amd64 and arm64 architectures).
#9047

Tested goreleaser locally.
This commit is contained in:
Victor Lyuboslavsky 2024-01-26 08:01:12 -06:00 committed by GitHub
parent 9f244bb787
commit b8ccebcbca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 1 deletions

View File

@ -40,7 +40,6 @@ builds:
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
@ -55,6 +54,32 @@ builds:
- -X github.com/fleetdm/fleet/v4/server/version.buildDate={{ time "2006-01-02" }}
- -X github.com/fleetdm/fleet/v4/server/version.buildUser={{ .Env.USER }}
- id: fleetctl-macos
dir: ./cmd/fleetctl/
binary: fleetctl
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -X github.com/fleetdm/fleet/v4/server/version.appName={{ .ArtifactName }}
- -X github.com/fleetdm/fleet/v4/server/version.version={{ .Version }}
- -X github.com/fleetdm/fleet/v4/server/version.branch={{ .Branch }}
- -X github.com/fleetdm/fleet/v4/server/version.revision={{ .FullCommit }}
- -X github.com/fleetdm/fleet/v4/server/version.buildDate={{ time "2006-01-02" }}
- -X github.com/fleetdm/fleet/v4/server/version.buildUser={{ .Env.USER }}
universal_binaries:
- id: fleetctl # resulting binary id
ids: [fleetctl-macos] # source binaries
replace: true
name_template: fleetctl # resulting binary name
archives:
- id: fleet
builds:

View File

@ -0,0 +1 @@
Release fleetctl for macOS as a universal binary (native support for both amd64 and arm64 architectures).