From 935fa7f12d7a23c34122587671cc0793169e2d11 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 16 Jul 2020 13:18:57 +0200 Subject: [PATCH] make+mobile: pass expected falafel version to build script --- Makefile | 2 +- mobile/gen_bindings.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 224ac28a..e474fbe5 100644 --- a/Makefile +++ b/Makefile @@ -226,7 +226,7 @@ rpc-check: rpc mobile-rpc: falafel goimports @$(call print, "Creating mobile RPC from protos.") - cd ./mobile; ./gen_bindings.sh + cd ./mobile; ./gen_bindings.sh $(FALAFEL_COMMIT) vendor: @$(call print, "Re-creating vendor directory.") diff --git a/mobile/gen_bindings.sh b/mobile/gen_bindings.sh index 14cb7665..2e54beaa 100755 --- a/mobile/gen_bindings.sh +++ b/mobile/gen_bindings.sh @@ -3,11 +3,17 @@ mkdir -p build # Check falafel version. -falafelVersion="0.7.1" +falafelVersion=$1 +if [ -z $falafelVersion ] +then + echo "falafel version not set" + exit 1 +fi + falafel=$(which falafel) if [ $falafel ] then - version=$($falafel -v) + version="v$($falafel -v)" if [ $version != $falafelVersion ] then echo "falafel version $falafelVersion required"