Skip to content

Commit ebb93ef

Browse files
committed
chore(Makefile): download ko as a binary
1 parent fab7f9d commit ebb93ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Toolchain.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ ifeq (, $(shell which $(KO)))
121121
$(info $(M) installing ko)
122122
@{ \
123123
set -e ;\
124-
GOBIN=$(BIN) go install github.com/google/ko@$(KO_VERSION) ;\
125-
mv $(BIN)/ko $(KO) ;\
124+
OSTYPE=$(shell uname | awk '{print $$0}') && ARCH=$(shell go env GOARCH) && \
125+
curl -sSLo $(KO).tar.gz https://github.com/ko-build/ko/releases/download/$(KO_VERSION)/ko_$${OSTYPE}_$${ARCH}.tar.gz && \
126+
tar -zxvf $(KO).tar.gz ko && \
127+
chmod +x ko && \
128+
mv ko $(KO) && \
129+
rm $(KO).tar.gz ;\
126130
}
127131
endif
128132

0 commit comments

Comments
 (0)