Skip to content

Commit ab26535

Browse files
committed
Add check for ctr version
Signed-off-by: James Sturtevant <[email protected]>
1 parent 85898d5 commit ab26535

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,11 @@ dist/img-oci.tar: target/wasm32-wasi/$(OPT_PROFILE)/img-oci.tar
188188
load: dist/img.tar
189189
sudo ctr -n $(CONTAINERD_NAMESPACE) image import --all-platforms $<
190190

191+
CTR_VERSION := $(shell sudo ctr version | sed -n -e '/Version/ {s/.*: *//p;q;}')
191192
load/oci: dist/img-oci.tar
192-
sudo ../containerd/bin/ctr -n $(CONTAINERD_NAMESPACE) image import --all-platforms $<
193+
@echo $(CTR_VERSION)\\nv1.7.7 | sort -crV || (echo "containerd version must be 1.7.7+ was $(CTR_VERSION)" && exit 1)
194+
@echo using containerd $(CTR_VERSION)
195+
sudo ctr -n $(CONTAINERD_NAMESPACE) image import --all-platforms $<
193196

194197
.PHONY:
195198
target/wasm32-wasi/$(OPT_PROFILE)/img-oci.tar: target/wasm32-wasi/$(OPT_PROFILE)/wasi-demo-app.wasm

0 commit comments

Comments
 (0)