Skip to content

Commit 54a1faf

Browse files
committed
node-installer: modify the makefile for binary handling
Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
1 parent aca6e02 commit 54a1faf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

node-installer/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ IMAGE_NAME ?= ghcr.io/spinkube/containerd-shim-spin/node-installer
33
PLATFORM ?= linux/amd64
44
ARCH ?= x86_64
55
TARGET ?= $(ARCH)-unknown-linux-musl
6+
BINARY := ./.tmp/$(PLATFORM)/containerd-shim-spin-$(SPIN_VERSION)
67

78
compile-musl:
89
make build-cross-$(TARGET) -C ../
910

10-
move-musl-to-tmp: compile-musl
11-
mkdir -p ./.tmp
12-
cp ../target/$(TARGET)/release/containerd-shim-spin-$(SPIN_VERSION) ./.tmp/$(PLATFORM)/
11+
$(BINARY):
12+
mkdir -p ./.tmp/$(PLATFORM)
13+
$(MAKE) compile-musl
14+
cp ../target/$(TARGET)/release/containerd-shim-spin-$(SPIN_VERSION) $(BINARY)
1315

14-
build-multi-installer-image: move-musl-to-tmp
16+
build-multi-installer-image: $(BINARY)
1517
docker buildx build -t $(IMAGE_NAME) --platform linux/amd64,linux/arm64 .
1618

17-
build-dev-installer-image: move-musl-to-tmp
19+
build-dev-installer-image: $(BINARY)
1820
docker buildx build -t $(IMAGE_NAME) --load --platform $(PLATFORM) .
1921

2022
test:

0 commit comments

Comments
 (0)