From 59733da383e12d7ee0cc1fc16e072dd90a2da8d1 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 15 Feb 2021 13:30:56 +0100 Subject: [PATCH] Verify FFI version before building Resolves: #5003 Signed-off-by: Jakub Sztandera --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c3abfb7b4..0f3a49a95 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,15 @@ MODULES+=$(FFI_PATH) BUILD_DEPS+=build/.filecoin-install CLEAN+=build/.filecoin-install -$(MODULES): build/.update-modules ; +ffi-version-check: + @[[ "$$(awk '/const Version/{print $$5}' extern/filecoin-ffi/version.go)" -eq 1 ]] || (echo "FFI version mismatch, update submodules"; exit 1) +BUILD_DEPS+=ffi-version-check + +.PHONY: ffi-version-check + # dummy file that marks the last time modules were updated -build/.update-modules: +build/.update-modules: $(MODULES) git submodule update --init --recursive touch $@