From a07e6a68d02bad68d347a4b8c28dcd198290e155 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Wed, 25 Jul 2018 11:45:01 +0300 Subject: [PATCH 1/2] Fix -ota tag of env:itead-sonoff-dual-r2-ota --- code/platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/platformio.ini b/code/platformio.ini index 7802bd91..2c57785f 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -545,7 +545,7 @@ lib_ignore = ${common.lib_ignore} build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_DUAL_R2 extra_scripts = ${common.extra_scripts} -[env:itead-sonoff-dual-ota-r2] +[env:itead-sonoff-dual-r2-ota] platform = ${common.platform} framework = ${common.framework} board = ${common.board_1m} From 25c7a00c24a5c2f6a8f22c6ab18abbbda2ac9cc4 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Wed, 25 Jul 2018 11:46:32 +0300 Subject: [PATCH 2/2] Better filter for -ota envs --- code/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/build.sh b/code/build.sh index 57b030f9..f00471f4 100755 --- a/code/build.sh +++ b/code/build.sh @@ -27,8 +27,12 @@ if [ ${par_thread} -ge ${par_total_threads} ]; then fi # Available environments -travis=$(grep env: platformio.ini | grep travis | sed 's/\[env://' | sed 's/\]/ /' | sort) -available=$(grep env: platformio.ini | grep -v ota | grep -v ssl | grep -v travis | sed 's/\[env://' | sed 's/\]/ /' | sort) +list_envs() { + grep env: platformio.ini | sed 's/\[env:\(.*\)\]/\1/g' +} + +travis=$(list_envs | grep travis | sort) +available=$(list_envs | grep -Ev -- '-ota$|-ssl$|^travis' | sort) # Build tools settings export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -DAPP_REVISION='\"$git_revision\"'"