Skip to content

Commit

Permalink
Verify FFI version before building
Browse files Browse the repository at this point in the history
Resolves: #5003

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
  • Loading branch information
Jakub Sztandera committed Feb 15, 2021
1 parent 95e47cf commit 59733da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@

Expand Down

0 comments on commit 59733da

Please sign in to comment.