Skip to content

Commit 7a7db5b

Browse files
committed
fix defining arch in Makefile for ko
1 parent f60e0ce commit 7a7db5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ REGISTRY?=gcr.io/k8s-minikube
22
VERSION=v0.0.9
33
GOOS?=$(shell go env GOOS)
44
GOARCH?=$(shell go env GOARCH)
5+
ARCH=$(if $(findstring amd64, $(GOARCH)),x86_64,$(GOARCH))
56
KO_VERSION=0.11.2
67

78
build: ## Build the gcp-auth-webhook binary
@@ -10,7 +11,7 @@ build: ## Build the gcp-auth-webhook binary
1011
.PHONY: image
1112
image: ## Create and push multiarch manifest and images
1213
@read -p "This will build and push $(REGISTRY)/gcp-auth-webhook:$(VERSION). Do you want to proceed? (Y/N): " confirm && echo $$confirm | grep -iq "^[yY]" || exit 1;
13-
curl -L https://github.com/google/ko/releases/download/v$(KO_VERSION)/ko_$(KO_VERSION)_$(GOOS)_$(GOARCH).tar.gz | tar xzf - ko && chmod +x ./ko
14+
curl -L https://github.com/google/ko/releases/download/v$(KO_VERSION)/ko_$(KO_VERSION)_$(GOOS)_$(ARCH).tar.gz | tar xzf - ko && chmod +x ./ko
1415
KO_DOCKER_REPO=$(REGISTRY) ./ko publish -B . --platform all -t $(VERSION)
1516
rm ./ko
1617

0 commit comments

Comments
 (0)