From 73efbd90abf8e2d045cf1d9a5f19f5397836a691 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 4 May 2021 16:47:47 -0400 Subject: [PATCH] Better way to invoke `make single` --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d482520a..f2572d28 100644 --- a/Makefile +++ b/Makefile @@ -78,14 +78,14 @@ all: ##@Cross_Compilation Build binaries for all supported platforms. It does no .PHONY: all single: ##@Cross_Compilation Build binaries for a single supported platforms. It does not build the frontend - @if [ -z "${GOOS}" ]; then \ - echo "Usage: GOOS= GOARCH= make snapshot-single"; \ + @if [ -z "${os}" -o -z "${arch}" ]; then \ + echo "Usage: make single os= arch= "; \ echo "Options:"; \ grep -- "- id: navidrome_" .goreleaser.yml | sed 's/- id: navidrome_//g'; \ exit 1; \ fi - @echo "Building binaries for ${GOOS}/${GOARCH}" - docker run -t -v $(PWD):/workspace -e GOOS -e GOARCH -w /workspace deluan/ci-goreleaser:$(CI_RELEASER_VERSION) \ + @echo "Building binaries for ${os}/${arch}" + docker run -t -v $(PWD):/workspace -e GOOS=${os} -e GOARCH=${arch} -w /workspace deluan/ci-goreleaser:$(CI_RELEASER_VERSION) \ goreleaser build --rm-dist --snapshot --single-target --id navidrome_${GOOS}_${GOARCH} .PHONY: single