From 3bf1c762b428298eee3ef1bb4090e66fd78a1b51 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Wed, 10 Jul 2024 16:11:32 -0700 Subject: [PATCH 1/8] Use GoReleaser Pro for Makefile builds --- .goreleaser.yml | 8 +++---- Makefile | 59 +++++++++++++------------------------------------ 2 files changed, 19 insertions(+), 48 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d3b8377d7..4d36a9429 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,9 +4,7 @@ project_name: step before: hooks: - # You may remove this if you don't use go modules. - go mod download - # - go generate ./... builds: - &COMMON @@ -36,8 +34,10 @@ builds: - windows_amd64 - windows_arm64 binary: bin/step - ldflags: - - -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}} + - + << : *COMMON + id: debug + gcflags: all=-N -l - # This build is for S3 binaries that follow our naming convention there. << : *COMMON diff --git a/Makefile b/Makefile index b2fdf70a3..546556750 100644 --- a/Makefile +++ b/Makefile @@ -8,33 +8,6 @@ ci: test build # Determine the type of `push` and `version` ################################################# -ifdef GITHUB_REF -VERSION ?= $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///') -NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) - ifeq ($(NOT_RC),) -PUSHTYPE := release-candidate - else -PUSHTYPE := release - endif -else -VERSION ?= $(shell [ -d .git ] && git describe --tags --always --dirty="-dev") -# If we are not in an active git dir then try reading the version from .VERSION. -# .VERSION contains a slug populated by `git archive`. -VERSION := $(or $(VERSION),$(shell make/version.sh .VERSION)) -PUSHTYPE := branch -endif - -VERSION := $(shell echo $(VERSION) | sed 's/^v//') - -ifdef V -$(info GITHUB_REF is $(GITHUB_REF)) -$(info VERSION is $(VERSION)) -$(info PUSHTYPE is $(PUSHTYPE)) -endif - -PKG?=github.com/smallstep/cli/cmd/step -BINNAME?=step - # Set V to 1 for verbose output from the Makefile Q=$(if $V,,@) PREFIX?= @@ -42,6 +15,11 @@ SRC=$(shell find . -type f -name '*.go') GOOS_OVERRIDE ?= CGO_OVERRIDE ?= CGO_ENABLED=0 OUTPUT_ROOT=output/ +BUILDID?=default +ifdef DEBUG + BUILDID=debug +endif + .PHONY: all @@ -62,26 +40,19 @@ bootstra%: # Build ######################################### -DATE := $(shell date -u '+%Y-%m-%d %H:%M UTC') -ifdef DEBUG - LDFLAGS := -ldflags='-X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"' - GCFLAGS := -gcflags "all=-N -l" -else - LDFLAGS := -ldflags='-w -X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"' - GCFLAGS := -endif - -download: - $Q go mod download - -build: $(PREFIX)bin/$(BINNAME) +build: $(PREFIX)bin/step @echo "Build Complete!" -$(PREFIX)bin/$(BINNAME): download $(call rwildcard,*.go) +$(PREFIX)bin/step: $Q mkdir -p $(@D) - $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) go build -v -o $@ $(GCFLAGS) $(LDFLAGS) $(PKG) + $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) goreleaser build \ + --id $(BUILDID) \ + --snapshot \ + --single-target \ + --clean \ + --output $(PREFIX)bin/step -.PHONY: build simple +.PHONY: build ######################################### # Test @@ -157,7 +128,7 @@ define BUNDLE_MAKE # $(2) -- Go Architecture (e.g. amd64, arm, arm64, etc.) # $(3) -- Go ARM architectural family (e.g. 7, 8, etc.) # $(4) -- Parent directory for executables generated by 'make'. - $(q) GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)bin/step + $(q) GOOS=$(1) GOARCH=$(2) GOARM=$(3) PREFIX=$(4) make $(4)bin/step endef binary-linux-amd64: From 4bac69ecc586e416fce71d2226293635ab7e5d94 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Wed, 10 Jul 2024 16:18:06 -0700 Subject: [PATCH 2/8] Cleanups --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 546556750..90450ca4f 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,10 @@ SRC=$(shell find . -type f -name '*.go') GOOS_OVERRIDE ?= CGO_OVERRIDE ?= CGO_ENABLED=0 OUTPUT_ROOT=output/ -BUILDID?=default + +GORELEASER_BUILD_ID?=default ifdef DEBUG - BUILDID=debug + GORELEASER_BUILD_ID=debug endif @@ -46,7 +47,7 @@ build: $(PREFIX)bin/step $(PREFIX)bin/step: $Q mkdir -p $(@D) $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) goreleaser build \ - --id $(BUILDID) \ + --id $(GORELEASER_BUILD_ID) \ --snapshot \ --single-target \ --clean \ @@ -68,7 +69,7 @@ race: integrate: integration -integration: bin/$(BINNAME) +integration: bin/step $Q $(CGO_OVERRIDE) gotestsum -- -tags=integration ./integration/... .PHONY: integrate integration @@ -97,12 +98,12 @@ govulncheck: INSTALL_PREFIX?=/usr/local/ -install: $(PREFIX)bin/$(BINNAME) +install: $(PREFIX)bin/step $Q mkdir -p $(INSTALL_PREFIX)bin/ - $Q install $(PREFIX)bin/$(BINNAME) $(DESTDIR)$(INSTALL_PREFIX)bin/$(BINNAME) + $Q install $(PREFIX)bin/step $(DESTDIR)$(INSTALL_PREFIX)bin/step uninstall: - $Q rm -f $(DESTDIR)$(INSTALL_PREFIX)/bin/$(BINNAME) + $Q rm -f $(DESTDIR)$(INSTALL_PREFIX)/bin/step .PHONY: install uninstall @@ -111,9 +112,8 @@ uninstall: ######################################### clean: -ifneq ($(BINNAME),"") - $Q rm -f bin/$(BINNAME) -endif + $Q rm -f bin/step + $Q rm -rf dist .PHONY: clean From dd1b642a0f4da5c2527dcf97f1aed386809185f2 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 16 Jul 2024 15:56:17 -0700 Subject: [PATCH 3/8] Build using go by default. Add goreleaser goal and an intro at the top --- Makefile | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 90450ca4f..88bb92f85 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +# Set V=1 for verbose output. +# Run `make bootstrap` to set up your local environment. +# To build using go, use `make build` +# For a binary that's in parity with how our CI system builds, +# run `make goreleaser` to build using GoReleaser Pro. + all: lint test build ci: test build @@ -8,7 +14,39 @@ ci: test build # Determine the type of `push` and `version` ################################################# -# Set V to 1 for verbose output from the Makefile +ifdef GITHUB_REF +VERSION ?= $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///') +NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) + ifeq ($(NOT_RC),) +PUSHTYPE := release-candidate + else +PUSHTYPE := release + endif +else +VERSION ?= $(shell [ -d .git ] && git describe --tags --always --dirty="-dev") +# If we are not in an active git dir then try reading the version from .VERSION. +# .VERSION contains a slug populated by `git archive`. +VERSION := $(or $(VERSION),$(shell make/version.sh .VERSION)) +PUSHTYPE := branch +endif + +VERSION := $(shell echo $(VERSION) | sed 's/^v//') + +ifdef V +$(info GITHUB_REF is $(GITHUB_REF)) +$(info VERSION is $(VERSION)) +$(info PUSHTYPE is $(PUSHTYPE)) +endif + +DATE := $(shell date -u '+%Y-%m-%d %H:%M UTC') +ifdef DEBUG + LDFLAGS := -ldflags='-X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"' + GCFLAGS := -gcflags "all=-N -l" +else + LDFLAGS := -ldflags='-w -X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"' + GCFLAGS := +endif + Q=$(if $V,,@) PREFIX?= SRC=$(shell find . -type f -name '*.go') @@ -21,7 +59,6 @@ ifdef DEBUG GORELEASER_BUILD_ID=debug endif - .PHONY: all ######################################### @@ -45,6 +82,14 @@ build: $(PREFIX)bin/step @echo "Build Complete!" $(PREFIX)bin/step: + $Q mkdir -p $(@D) + $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) go build \ + -v \ + -o $(PREFIX)bin/step \ + $(GCFLAGS) $(LDFLAGS) \ + github.com/smallstep/cli/cmd/step + +goreleaser: $Q mkdir -p $(@D) $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) goreleaser build \ --id $(GORELEASER_BUILD_ID) \ @@ -53,7 +98,8 @@ $(PREFIX)bin/step: --clean \ --output $(PREFIX)bin/step -.PHONY: build +.PHONY: build gobuild + ######################################### # Test From 5808096394de4ab9ce1d036436b85a9494aadc24 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 16 Jul 2024 16:54:45 -0700 Subject: [PATCH 4/8] Re-add BINNAME and describe available vars --- Makefile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 88bb92f85..e65baab69 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,11 @@ -# Set V=1 for verbose output. +# Variables: +# V=1 for verbose output. +# BINNAME=step to change the name of the executable +# PREFIX=bin/ to change the build output path +# INSTALL_PREFIX=/usr/local/bin to change the install path +# GOOS_OVERRIDE="GOOS=linux GOARCH=arm64" to change OS and arch +# CGO_OVERRIDE="CGO_ENABLED=1" to enable CGO +# # Run `make bootstrap` to set up your local environment. # To build using go, use `make build` # For a binary that's in parity with how our CI system builds, @@ -53,6 +60,7 @@ SRC=$(shell find . -type f -name '*.go') GOOS_OVERRIDE ?= CGO_OVERRIDE ?= CGO_ENABLED=0 OUTPUT_ROOT=output/ +BINNAME?=step GORELEASER_BUILD_ID?=default ifdef DEBUG @@ -78,14 +86,14 @@ bootstra%: # Build ######################################### -build: $(PREFIX)bin/step +build: $(PREFIX)bin/$(BINNAME) @echo "Build Complete!" -$(PREFIX)bin/step: +$(PREFIX)bin/$(BINNAME): $Q mkdir -p $(@D) $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) go build \ -v \ - -o $(PREFIX)bin/step \ + -o $(PREFIX)bin/$(BINNAME) \ $(GCFLAGS) $(LDFLAGS) \ github.com/smallstep/cli/cmd/step @@ -96,9 +104,9 @@ goreleaser: --snapshot \ --single-target \ --clean \ - --output $(PREFIX)bin/step + --output $(PREFIX)bin/$(BINNAME) -.PHONY: build gobuild +.PHONY: build goreleaser ######################################### @@ -115,7 +123,7 @@ race: integrate: integration -integration: bin/step +integration: bin/$(BINNAME) $Q $(CGO_OVERRIDE) gotestsum -- -tags=integration ./integration/... .PHONY: integrate integration @@ -174,7 +182,7 @@ define BUNDLE_MAKE # $(2) -- Go Architecture (e.g. amd64, arm, arm64, etc.) # $(3) -- Go ARM architectural family (e.g. 7, 8, etc.) # $(4) -- Parent directory for executables generated by 'make'. - $(q) GOOS=$(1) GOARCH=$(2) GOARM=$(3) PREFIX=$(4) make $(4)bin/step + $Q GOOS=$(1) GOARCH=$(2) GOARM=$(3) PREFIX=$(4) make $(4)bin/step endef binary-linux-amd64: From a5d4e9dc8a1e094d16ce167a2b60577c754cf9f8 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 16 Jul 2024 16:59:45 -0700 Subject: [PATCH 5/8] One more fix --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e65baab69..f4ebb5ade 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # BINNAME=step to change the name of the executable # PREFIX=bin/ to change the build output path # INSTALL_PREFIX=/usr/local/bin to change the install path -# GOOS_OVERRIDE="GOOS=linux GOARCH=arm64" to change OS and arch +# GOOS_OVERRIDE="GOOS=linux GOARCH=arm GOARM=6" to change OS and arch # CGO_OVERRIDE="CGO_ENABLED=1" to enable CGO # # Run `make bootstrap` to set up your local environment. @@ -182,7 +182,7 @@ define BUNDLE_MAKE # $(2) -- Go Architecture (e.g. amd64, arm, arm64, etc.) # $(3) -- Go ARM architectural family (e.g. 7, 8, etc.) # $(4) -- Parent directory for executables generated by 'make'. - $Q GOOS=$(1) GOARCH=$(2) GOARM=$(3) PREFIX=$(4) make $(4)bin/step + $Q GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)bin/step endef binary-linux-amd64: From 9a7c8dcdc1598ef4afdb93a9a2431707e61094d0 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 22 Jul 2024 08:08:27 -0700 Subject: [PATCH 6/8] Rename INSTALL_PREFIX to DESTDIR and fix BINNAME --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f4ebb5ade..0f21f8b8b 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # V=1 for verbose output. # BINNAME=step to change the name of the executable # PREFIX=bin/ to change the build output path -# INSTALL_PREFIX=/usr/local/bin to change the install path +# DESTDIR=/usr/local/bin to change the install path # GOOS_OVERRIDE="GOOS=linux GOARCH=arm GOARM=6" to change OS and arch # CGO_OVERRIDE="CGO_ENABLED=1" to enable CGO # @@ -150,14 +150,14 @@ govulncheck: # Install ######################################### -INSTALL_PREFIX?=/usr/local/ +DESTDIR?=/usr/local/ -install: $(PREFIX)bin/step - $Q mkdir -p $(INSTALL_PREFIX)bin/ - $Q install $(PREFIX)bin/step $(DESTDIR)$(INSTALL_PREFIX)bin/step +install: $(PREFIX)bin/$(BINNAME) + $Q mkdir -p $(DESTDIR)bin/ + $Q install $(PREFIX)bin/$(BINNAME) $(DESTDIR)bin/$(BINNAME) uninstall: - $Q rm -f $(DESTDIR)$(INSTALL_PREFIX)/bin/step + $Q rm -f $(DESTDIR)/bin/$(BINNAME) .PHONY: install uninstall @@ -166,7 +166,7 @@ uninstall: ######################################### clean: - $Q rm -f bin/step + $Q rm -f bin/$(BINNAME) $Q rm -rf dist .PHONY: clean @@ -182,7 +182,7 @@ define BUNDLE_MAKE # $(2) -- Go Architecture (e.g. amd64, arm, arm64, etc.) # $(3) -- Go ARM architectural family (e.g. 7, 8, etc.) # $(4) -- Parent directory for executables generated by 'make'. - $Q GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)bin/step + $Q GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)bin/$(BINNAME) endef binary-linux-amd64: From eaa48fa62b6c7c8f64fa250e826f729d67f40ca2 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 22 Jul 2024 09:23:30 -0700 Subject: [PATCH 7/8] Cleanups and small fixes --- Makefile | 58 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 0f21f8b8b..9ec28acbc 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,26 @@ -# Variables: -# V=1 for verbose output. -# BINNAME=step to change the name of the executable -# PREFIX=bin/ to change the build output path -# DESTDIR=/usr/local/bin to change the install path -# GOOS_OVERRIDE="GOOS=linux GOARCH=arm GOARM=6" to change OS and arch -# CGO_OVERRIDE="CGO_ENABLED=1" to enable CGO -# # Run `make bootstrap` to set up your local environment. # To build using go, use `make build` # For a binary that's in parity with how our CI system builds, # run `make goreleaser` to build using GoReleaser Pro. +# Variables: +# V=1 for verbose output. + +# the name of the executable +BINNAME?=step + +# the build output path +PREFIX?=bin + +# the install path +DESTDIR?=/usr/local/bin + +# GOOS_OVERRIDE="GOOS=linux GOARCH=arm GOARM=6" to change OS and arch +GOOS_OVERRIDE?= + +# CGO_OVERRIDE="CGO_ENABLED=1" to enable CGO +CGO_OVERRIDE?=CGO_ENABLED=0 + all: lint test build ci: test build @@ -55,12 +65,8 @@ else endif Q=$(if $V,,@) -PREFIX?= SRC=$(shell find . -type f -name '*.go') -GOOS_OVERRIDE ?= -CGO_OVERRIDE ?= CGO_ENABLED=0 OUTPUT_ROOT=output/ -BINNAME?=step GORELEASER_BUILD_ID?=default ifdef DEBUG @@ -86,25 +92,25 @@ bootstra%: # Build ######################################### -build: $(PREFIX)bin/$(BINNAME) +build: $(PREFIX)/$(BINNAME) @echo "Build Complete!" -$(PREFIX)bin/$(BINNAME): - $Q mkdir -p $(@D) +$(PREFIX)/$(BINNAME): + $Q mkdir -p $(PREFIX) $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) go build \ -v \ - -o $(PREFIX)bin/$(BINNAME) \ + -o $(PREFIX)/$(BINNAME) \ $(GCFLAGS) $(LDFLAGS) \ github.com/smallstep/cli/cmd/step goreleaser: - $Q mkdir -p $(@D) + $Q mkdir -p $(PREFIX) $Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) goreleaser build \ --id $(GORELEASER_BUILD_ID) \ --snapshot \ --single-target \ --clean \ - --output $(PREFIX)bin/$(BINNAME) + --output $(PREFIX)/$(BINNAME) .PHONY: build goreleaser @@ -123,7 +129,7 @@ race: integrate: integration -integration: bin/$(BINNAME) +integration: build $Q $(CGO_OVERRIDE) gotestsum -- -tags=integration ./integration/... .PHONY: integrate integration @@ -150,14 +156,12 @@ govulncheck: # Install ######################################### -DESTDIR?=/usr/local/ - -install: $(PREFIX)bin/$(BINNAME) - $Q mkdir -p $(DESTDIR)bin/ - $Q install $(PREFIX)bin/$(BINNAME) $(DESTDIR)bin/$(BINNAME) +install: $(PREFIX)/$(BINNAME) + $Q mkdir -p $(DESTDIR)/ + $Q install $(PREFIX)/$(BINNAME) $(DESTDIR)/$(BINNAME) uninstall: - $Q rm -f $(DESTDIR)/bin/$(BINNAME) + $Q rm -f $(DESTDIR)/$(BINNAME) .PHONY: install uninstall @@ -166,7 +170,7 @@ uninstall: ######################################### clean: - $Q rm -f bin/$(BINNAME) + $Q rm -f $(PREFIX)/$(BINNAME) $Q rm -rf dist .PHONY: clean @@ -182,7 +186,7 @@ define BUNDLE_MAKE # $(2) -- Go Architecture (e.g. amd64, arm, arm64, etc.) # $(3) -- Go ARM architectural family (e.g. 7, 8, etc.) # $(4) -- Parent directory for executables generated by 'make'. - $Q GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)bin/$(BINNAME) + $Q GOOS_OVERRIDE='GOOS=$(1) GOARCH=$(2) GOARM=$(3)' PREFIX=$(4) make $(4)/$(BINNAME) endef binary-linux-amd64: From 0d49ffec61c13fb7cfe25b4475023bf7c0e0b40b Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 22 Jul 2024 09:27:41 -0700 Subject: [PATCH 8/8] Remove redundant / --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9ec28acbc..5aa413410 100644 --- a/Makefile +++ b/Makefile @@ -190,24 +190,24 @@ define BUNDLE_MAKE endef binary-linux-amd64: - $(call BUNDLE_MAKE,linux,amd64,,$(BINARY_OUTPUT)linux-amd64/) + $(call BUNDLE_MAKE,linux,amd64,,$(BINARY_OUTPUT)linux-amd64) binary-linux-arm64: - $(call BUNDLE_MAKE,linux,arm64,,$(BINARY_OUTPUT)linux-arm64/) + $(call BUNDLE_MAKE,linux,arm64,,$(BINARY_OUTPUT)linux-arm64) binary-linux-armv7: - $(call BUNDLE_MAKE,linux,arm,7,$(BINARY_OUTPUT)linux-armv7/) + $(call BUNDLE_MAKE,linux,arm,7,$(BINARY_OUTPUT)linux-armv7) binary-linux-mips: - $(call BUNDLE_MAKE,linux,mips,,$(BINARY_OUTPUT)linux-mips/) + $(call BUNDLE_MAKE,linux,mips,,$(BINARY_OUTPUT)linux-mips) binary-darwin-amd64: - $(call BUNDLE_MAKE,darwin,amd64,,$(BINARY_OUTPUT)darwin-amd64/) + $(call BUNDLE_MAKE,darwin,amd64,,$(BINARY_OUTPUT)darwin-amd64) binary-darwin-arm64: - $(call BUNDLE_MAKE,darwin,amd64,,$(BINARY_OUTPUT)darwin-arm64/) + $(call BUNDLE_MAKE,darwin,amd64,,$(BINARY_OUTPUT)darwin-arm64) binary-windows-amd64: - $(call BUNDLE_MAKE,windows,amd64,,$(BINARY_OUTPUT)windows-amd64/) + $(call BUNDLE_MAKE,windows,amd64,,$(BINARY_OUTPUT)windows-amd64) .PHONY: binary-linux-amd64 binary-linux-arm64 binary-linux-armv7 binary-linux-mips binary-darwin-amd64 binary-darwin-arm64 binary-windows-amd64