scripts/common-envs.mk: commit suggestions after a review

Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
This commit is contained in:
nbykov0
2025-05-06 16:24:26 +03:00
parent 951ba75d93
commit bbb93c647d

View File

@@ -16,6 +16,9 @@ ifeq ($(COZYSTACK_VERSION),)
endif
# Get the name of the default docker buildx builder
BUILDER ?= $(shell docker buildx inspect --bootstrap | head -n2 | awk '/^Name:/{print $$NF}')
BUILDER ?= $(shell jq -r '.Name' ~/.docker/buildx/current)
# Get platforms supported by the builder
# TODO: figure out how to get runners status dynamically, in json
# PLATFORM ?= $(shell jq -r '.Nodes[] | .Platforms | map(.os + "/" + .architecture) | join(",")' ~/.docker/buildx/instances/$(BUILDER))
PLATFORM ?= $(shell docker buildx inspect --bootstrap $(BUILDER) | egrep '^Platforms:' | egrep -o 'linux/amd64|linux/arm64' | sort -u | xargs | sed 's/ /,/g')