Browse Source

Build travis environments for non-master branches

rfm69
Xose Pérez 6 years ago
parent
commit
7e691f0408
2 changed files with 18 additions and 1 deletions
  1. +13
    -1
      code/build.sh
  2. +5
    -0
      code/espurna/config/hardware.h

+ 13
- 1
code/build.sh View File

@ -5,7 +5,10 @@ echo "--------------------------------------------------------------"
echo "ESPURNA FIRMWARE BUILDER" echo "ESPURNA FIRMWARE BUILDER"
# Available environments # 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=$@ environments=$@
if [ "$environments" == "list" ]; then if [ "$environments" == "list" ]; then
echo "--------------------------------------------------------------" echo "--------------------------------------------------------------"
@ -18,7 +21,16 @@ fi
# Environments to build # Environments to build
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
environments=$available environments=$available
# Hook to build travis test envs
if [[ "${TRAVIS_BRANCH}" != "" ]]; then
if [[ ${TRAVIS_BRANCH} != "master" ]]; then
environments=$travis
fi
fi
fi fi
# Get current version # Get current version


+ 5
- 0
code/espurna/config/hardware.h View File

@ -1532,6 +1532,10 @@
#define TERMINAL_SUPPORT 0 #define TERMINAL_SUPPORT 0
#define DEBUG_SERIAL_SUPPORT 0 #define DEBUG_SERIAL_SUPPORT 0
// -----------------------------------------------------------------------------
// TEST boards (do not use!!)
// -----------------------------------------------------------------------------
#elif defined(TRAVIS01) #elif defined(TRAVIS01)
// Info // Info
@ -1605,6 +1609,7 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Check definitions // Check definitions
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#if not defined(MANUFACTURER) || not defined(DEVICE) #if not defined(MANUFACTURER) || not defined(DEVICE)
#error "UNSUPPORTED HARDWARE!!" #error "UNSUPPORTED HARDWARE!!"
#endif #endif

Loading…
Cancel
Save