From 46ebe6320ad8b7988e2f8c85acf02a80d87add60 Mon Sep 17 00:00:00 2001 From: TamtamHero <10632523+TamtamHero@users.noreply.github.com> Date: Fri, 16 Apr 2021 13:12:07 +0200 Subject: [PATCH] Auto build ethereum-plugin-sdk --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9417200..2ce7488 100755 --- a/Makefile +++ b/Makefile @@ -325,13 +325,26 @@ ifeq ($(TARGET_NAME),TARGET_NANOX) SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl endif -### initialize plugin SDK submodule if needed, and rebuild it +### initialize plugin SDK submodule if needed, rebuild it, and warn if a difference is noticed +ifeq ($(CHAIN),ethereum) ifneq ($(shell git submodule status | grep '^[-+]'),) $(info INFO: Need to reinitialize git submodules) $(shell git submodule update --init) endif + +# rebuild $(shell python3 ethereum-plugin-sdk/build_sdk.py) +# check if a difference is noticed (fail if it happens in CI build) +ifneq ($(shell git status | grep 'ethereum-plugin-sdk'),) +ifneq ($(JENKINS_URL),) +$(error ERROR: please update ethereum-plugin-sdk submodule first) +else +$(warning WARNING: please update ethereum-plugin-sdk submodule first) +endif +endif +endif + load: all python3 -m ledgerblue.loadApp $(APP_LOAD_PARAMS)