From 59733da383e12d7ee0cc1fc16e072dd90a2da8d1 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 15 Feb 2021 13:30:56 +0100 Subject: [PATCH 1/2] 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 $@ From 06cc1eb155c49d95ea4702d8abc9d9132ecd92b4 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 15 Feb 2021 19:54:25 +0100 Subject: [PATCH 2/2] Revert unreleated cleanup Signed-off-by: Jakub Sztandera --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f3a49a95..d1c7a42a2 100644 --- a/Makefile +++ b/Makefile @@ -48,8 +48,9 @@ BUILD_DEPS+=ffi-version-check .PHONY: ffi-version-check +$(MODULES): build/.update-modules ; # dummy file that marks the last time modules were updated -build/.update-modules: $(MODULES) +build/.update-modules: git submodule update --init --recursive touch $@