From 7e691f04081cbf742745a592bee72b9f82ef104b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Fri, 9 Mar 2018 08:11:38 +0100 Subject: [PATCH] Build travis environments for non-master branches --- code/build.sh | 14 +++++++++++++- code/espurna/config/hardware.h | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/build.sh b/code/build.sh index 58ce7801..8251a20b 100755 --- a/code/build.sh +++ b/code/build.sh @@ -5,7 +5,10 @@ echo "--------------------------------------------------------------" echo "ESPURNA FIRMWARE BUILDER" # Available environments -available=$(grep env: platformio.ini | grep -v ota | grep -v ssl | sed 's/\[env://' | sed 's/\]/ /' | sort) +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) + +# Parameters environments=$@ if [ "$environments" == "list" ]; then echo "--------------------------------------------------------------" @@ -18,7 +21,16 @@ fi # Environments to build if [ $# -eq 0 ]; then + environments=$available + + # Hook to build travis test envs + if [[ "${TRAVIS_BRANCH}" != "" ]]; then + if [[ ${TRAVIS_BRANCH} != "master" ]]; then + environments=$travis + fi + fi + fi # Get current version diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index eec42311..8c64d067 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1532,6 +1532,10 @@ #define TERMINAL_SUPPORT 0 #define DEBUG_SERIAL_SUPPORT 0 +// ----------------------------------------------------------------------------- +// TEST boards (do not use!!) +// ----------------------------------------------------------------------------- + #elif defined(TRAVIS01) // Info @@ -1605,6 +1609,7 @@ // ----------------------------------------------------------------------------- // Check definitions // ----------------------------------------------------------------------------- + #if not defined(MANUFACTURER) || not defined(DEVICE) #error "UNSUPPORTED HARDWARE!!" #endif