mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
Add PLATFORM make variable; calculate it if undefined
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
This commit is contained in:
@@ -14,3 +14,16 @@ ifeq ($(COZYSTACK_VERSION),)
|
||||
$(shell git fetch upstream --tags)
|
||||
COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags))
|
||||
endif
|
||||
|
||||
# Calculate PLATFORM based on current docker daemon arch
|
||||
ifndef PLATFORM
|
||||
DOCKER_DAEMON_ARCH := $(shell docker info --format='{{.Architecture}}')
|
||||
ifeq ($(DOCKER_DAEMON_ARCH),x86_64)
|
||||
PLATFORM := linux/amd64
|
||||
else ifeq ($(DOCKER_DAEMON_ARCH),aarch64)
|
||||
PLATFORM := linux/arm64
|
||||
else
|
||||
$(error Unsupported architecture: "$(DOCKER_DAEMON_ARCH)")
|
||||
endif
|
||||
undefine DOCKER_DAEMON_ARCH
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user