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


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

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

Loading…
Cancel
Save