diff --git a/.goreleaser.yml b/.goreleaser.yml index e36fcc39c..e4fa880ed 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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: diff --git a/changes/9047-fleetctl-universal-binary b/changes/9047-fleetctl-universal-binary new file mode 100644 index 000000000..3ae66e522 --- /dev/null +++ b/changes/9047-fleetctl-universal-binary @@ -0,0 +1 @@ +Release fleetctl for macOS as a universal binary (native support for both amd64 and arm64 architectures).