Skip to content

Commit

Permalink
fix: ensure NODE_VERSION and NODE_COMMIT are set for upgrade builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Oct 8, 2024
1 parent 45a9b05 commit cae20fb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cae20fb

Please sign in to comment.