You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+37-15Lines changed: 37 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,17 @@ export BUILDKIT_PROGRESS=plain
9
9
## Required to have the commit SHA added as a Docker image label
10
10
exportCOMMIT_SHA=$(shell git rev-parse HEAD)
11
11
12
+
current_os := $(shell uname -s)
12
13
current_arch := $(shell uname -m)
14
+
15
+
exportOS := $(shell \
16
+
case "$(current_os)" in \
17
+
(Linux) echo linux ;; \
18
+
(Darwin) echo linux ;; \
19
+
(MINGW*|MSYS*|CYGWIN*) echo windows ;; \
20
+
(*) echo unknown ;; \
21
+
esac)
22
+
13
23
exportARCH ?= $(shell \
14
24
case $(current_arch) in \
15
25
(x86_64) echo "amd64" ;; \
@@ -31,7 +41,7 @@ TEST_SUITES ?= $(CURDIR)/tests
31
41
## Check the presence of a CLI in the current PATH
32
42
check_cli = type "$(1)" >/dev/null 2>&1 || { echo "Error: command '$(1)' required but not found. Exiting." ; exit 1 ; }
33
43
## Check if a given image exists in the current manifest docker-bake.hcl
34
-
check_image = make --silent list | grep -w '$(1)' >/dev/null 2>&1 || { echo "Error: the image '$(1)' does not exist in manifest for the platform 'linux/$(ARCH)'. Please check the output of 'make list'. Exiting." ; exit 1 ; }
44
+
check_image = make --silent list | grep -w '$(1)' >/dev/null 2>&1 || { echo "Error: the image '$(1)' does not exist in manifest for the current platform '$(OS)/$(ARCH)'. Please check the output of 'make list'. Exiting." ; exit 1 ; }
35
45
## Base "docker buildx base" command to be reused everywhere
0 commit comments