mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
[dx] Allow to not specify BUILDER for makefile if PLATFORM specified
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
@@ -17,6 +17,8 @@ endif
|
||||
|
||||
# Get the name of the selected docker buildx builder
|
||||
BUILDER ?= $(shell docker buildx inspect --bootstrap | head -n2 | awk '/^Name:/{print $$NF}')
|
||||
# Get platforms supported by the builder
|
||||
PLATFORM ?= $(shell docker buildx ls --format=json | jq -r 'select(.Name == "$(BUILDER)") | [.Nodes[].Platforms // []] | flatten | unique | map(select(test("^linux/amd64$$|^linux/arm64$$"))) | join(",")')
|
||||
|
||||
# Get platforms supported by the builder (only if PLATFORM is not provided)
|
||||
ifeq ($(origin PLATFORM), undefined)
|
||||
PLATFORM := $(shell docker buildx ls --format=json | jq -r 'select(.Name == "$(BUILDER)") | [.Nodes[].Platforms // []] | flatten | unique | map(select(test("^linux/amd64$$|^linux/arm64$$"))) | join(",")')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user