From d0a039c17b55533f9d19e49c3405a13e4f5a65fd Mon Sep 17 00:00:00 2001 From: Glenn Date: Sun, 21 Aug 2022 16:11:42 +0200 Subject: [PATCH] bug: Fix makefile according to latest go versions --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ac59dca..8133211 100644 --- a/Makefile +++ b/Makefile @@ -20,14 +20,9 @@ build: vendor ## build executable @mkdir -p "$(BUILD_DIR)" # go build -i ./... # GOBIN="$(BUILD_DIR)" go install ./... - for binary in "./cmd"/* ; do \ + for binary in $$(cd cmd ; ls) ; do \ name="$$(basename "$$binary")" ; \ - go build -i "$$binary" || exit 1 ; \ - if [ -f "$$name.exe" ]; then \ - mv "$$name.exe" "$(BUILD_DIR)/$$name.exe" || exit 1 ; \ - else \ - mv "$$name" "$(BUILD_DIR)/$$name" || exit 1 ; \ - fi ; \ + go build -o "_build/$$binary" ./cmd/$$binary/... || exit 1 ; \ done