bug: Fix makefile according to latest go versions

This commit is contained in:
Glenn Y. Rolland 2022-08-21 16:11:42 +02:00
parent 8ae5a415f6
commit d0a039c17b

View file

@ -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