From bbb93c647d8cd23a3af3571aadc4aada7ea18ed8 Mon Sep 17 00:00:00 2001 From: nbykov0 <166552198+nbykov0@users.noreply.github.com> Date: Tue, 6 May 2025 16:24:26 +0300 Subject: [PATCH] scripts/common-envs.mk: commit suggestions after a review Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com> --- scripts/common-envs.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/common-envs.mk b/scripts/common-envs.mk index 79b08799..a2a4c103 100644 --- a/scripts/common-envs.mk +++ b/scripts/common-envs.mk @@ -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') +