Better way to invoke `make single`

This commit is contained in:
Deluan 2021-05-04 16:47:47 -04:00
parent cbc4cb483d
commit 73efbd90ab
1 changed files with 4 additions and 4 deletions

View File

@ -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=<os> GOARCH=<arch> make snapshot-single"; \
@if [ -z "${os}" -o -z "${arch}" ]; then \
echo "Usage: make single os=<os> arch=<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