From da96414045923b2f729b56cbd50abbd84a0002bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20F=C3=B6hr?= <33809186+danielfoehrKn@users.noreply.github.com> Date: Sat, 13 Apr 2024 20:25:30 -0400 Subject: [PATCH] fix Makefile for switcher build for windows + git ignore windows binary --- .gitignore | 2 ++ Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8277cfe6..2731fcd5 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ hack/tools/bin/ /hack/switch/switcher_linux_arm64 /hack/switch/switcher_linux_arm64.tar.gz + +/hack/switch/switcher_windows* diff --git a/Makefile b/Makefile index f067ce21..abd97f22 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ build-switcher: @env GOOS=linux GOARCH=arm64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_linux_arm64 ./cmd/main.go @env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_darwin_amd64 ./cmd/main.go @env GOOS=darwin GOARCH=arm64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_darwin_arm64 ./cmd/main.go - @env GOOS=windows GOARCH=amd64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_windows_amd64.exe ./cmd/main.go + @env GOOS=windows GOARCH=amd64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o 'hack/switch/switcher_windows_amd64.exe' ./cmd/main.go .PHONY: all all: format check build