make+mobile: pass expected falafel version to build script

This commit is contained in:
Johan T. Halseth 2020-07-16 13:18:57 +02:00
parent 39241dcdc7
commit 935fa7f12d
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
2 changed files with 9 additions and 3 deletions

@ -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.")

@ -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"