From 1470fdceadb43c4fcf64b135d5881be5f53e2571 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Wed, 9 Oct 2024 08:51:57 -0700 Subject: [PATCH] fix: ensure NODE_VERSION and NODE_COMMIT are set for upgrade builds (#2981) --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 36e414f012..7b01eafb41 100644 --- a/Makefile +++ b/Makefile @@ -296,15 +296,24 @@ start-v2-test: zetanode ############################################################################### # build from source only if requested +# NODE_VERSION and NODE_COMMIT must be set as old-runtime depends on lastest-runtime ifdef UPGRADE_TEST_FROM_SOURCE zetanode-upgrade: zetanode @echo "Building zetanode-upgrade from source" - $(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime-source --build-arg OLD_VERSION='release/v20' . + $(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime-source \ + --build-arg OLD_VERSION='release/v20' \ + --build-arg NODE_VERSION=$(NODE_VERSION) \ + --build-arg NODE_COMMIT=$(NODE_COMMIT) + . .PHONY: zetanode-upgrade else zetanode-upgrade: zetanode @echo "Building zetanode-upgrade from binaries" - $(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime --build-arg OLD_VERSION='https://github.com/zeta-chain/node/releases/download/v20.0.2' . + $(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime \ + --build-arg OLD_VERSION='https://github.com/zeta-chain/node/releases/download/v20.0.2' \ + --build-arg NODE_VERSION=$(NODE_VERSION) \ + --build-arg NODE_COMMIT=$(NODE_COMMIT) \ + . .PHONY: zetanode-upgrade endif