From 9e67e2d6db3d5a4a28c77911a0b538021a79c6a7 Mon Sep 17 00:00:00 2001 From: Chris Martin <101210272+ChrisScotMartin@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:51:39 -0400 Subject: [PATCH 1/5] create a release that will actually run on m1 macs for testing --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bde8efa..aa3c5f2 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,8 @@ release: -o="$@/$(EXECUTABLE)-$(VERSION)-linux-amd64" $(EXECUTABLE_PKG) GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(VERSION)" \ -o="$@/$(EXECUTABLE)-$(VERSION)-darwin-amd64" $(EXECUTABLE_PKG) - + GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=$(VERSION)" \ + -o="$@/$(EXECUTABLE)-$(VERSION)-darwin-arm64" clean: rm -rf bin release From ac46f373af2ca33f3a76e867098fcc2c91e7d5ac Mon Sep 17 00:00:00 2001 From: Chris Martin <101210272+ChrisScotMartin@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:53:35 -0400 Subject: [PATCH 2/5] keep formatting the same as the others --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa3c5f2..69e2f17 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ release: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(VERSION)" \ -o="$@/$(EXECUTABLE)-$(VERSION)-darwin-amd64" $(EXECUTABLE_PKG) GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=$(VERSION)" \ - -o="$@/$(EXECUTABLE)-$(VERSION)-darwin-arm64" +-o="$@/$(EXECUTABLE)-$(VERSION)-darwin-arm64" clean: rm -rf bin release From a56804029ec0bfae217b57903891cdfa9c20b86b Mon Sep 17 00:00:00 2001 From: Chris Martin <101210272+ChrisScotMartin@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:13:24 -0400 Subject: [PATCH 3/5] sfncli.mk is definied her not in a template repo TIL --- make/sfncli.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make/sfncli.mk b/make/sfncli.mk index 3f54a20..7337278 100644 --- a/make/sfncli.mk +++ b/make/sfncli.mk @@ -11,6 +11,7 @@ SFNCLI_LATEST = $(shell \ https://api.github.com/repos/Clever/sfncli/releases/latest | \ grep tag_name | \ cut -d\" -f4) +ARCH = $(shell go env GOARCH) .PHONY: bin/sfncli sfncli-update-makefile ensure-sfncli-version-set ensure-curl-installed @@ -35,7 +36,7 @@ bin/sfncli: ensure-sfncli-version-set ensure-curl-installed } \ else \ echo "Updating sfncli..."; \ - curl --retry 5 --fail --max-time 30 -o bin/sfncli -sL https://github.com/Clever/sfncli/releases/download/$(SFNCLI_VERSION)/sfncli-$(SFNCLI_VERSION)-$(SYSTEM)-amd64 && \ + curl --retry 5 --fail --max-time 30 -o bin/sfncli -sL https://github.com/Clever/sfncli/releases/download/$(SFNCLI_VERSION)/sfncli-$(SFNCLI_VERSION)-$(SYSTEM)-$(ARCH) && \ chmod +x bin/sfncli && \ echo "Successfully updated sfncli to $(SFNCLI_VERSION)" || \ { [[ -z "$(SFNCLI_INSTALLED)" ]] && \ From 35c7d8d38fa5220ca2c4fd1050d8aaaa15d3dd44 Mon Sep 17 00:00:00 2001 From: Chris Martin <101210272+ChrisScotMartin@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:14:35 -0400 Subject: [PATCH 4/5] bump sfncli.mk version --- make/sfncli.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/sfncli.mk b/make/sfncli.mk index 7337278..bd15685 100644 --- a/make/sfncli.mk +++ b/make/sfncli.mk @@ -1,6 +1,6 @@ # This is the default sfncli Makefile. # Please do not alter this file directly. -SFNCLI_MK_VERSION := 0.1.3 +SFNCLI_MK_VERSION := 0.1.4 SHELL := /bin/bash SYSTEM := $(shell uname -a | cut -d" " -f1 | tr '[:upper:]' '[:lower:]') SFNCLI_INSTALLED := $(shell [[ -e "bin/sfncli" ]] && bin/sfncli --version) From a2d673fa4094e7c910e40583f2ef637a5862fdb0 Mon Sep 17 00:00:00 2001 From: Chris Martin <101210272+ChrisScotMartin@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:19:48 -0400 Subject: [PATCH 5/5] weird bug fix --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 69e2f17..37e61f7 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,8 @@ release: -o="$@/$(EXECUTABLE)-$(VERSION)-linux-amd64" $(EXECUTABLE_PKG) GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=$(VERSION)" \ -o="$@/$(EXECUTABLE)-$(VERSION)-darwin-amd64" $(EXECUTABLE_PKG) - GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=$(VERSION)" \ --o="$@/$(EXECUTABLE)-$(VERSION)-darwin-arm64" + GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.Version=$(VERSION)" \ +-o="$@/$(EXECUTABLE)-$(VERSION)-darwin-arm64" $(EXECUTABLE_PKG) clean: rm -rf bin release