diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/build_adafruit_bins.sh | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/tools/build_adafruit_bins.sh b/tools/build_adafruit_bins.sh index e0899ba70..595d5ba5d 100755 --- a/tools/build_adafruit_bins.sh +++ b/tools/build_adafruit_bins.sh @@ -1,7 +1,10 @@ +#!/usr/bin/env bash + rm -rf ports/atmel-samd/build* rm -rf ports/esp8266/build* rm -rf ports/nrf/build* +# Alphabetical. HW_BOARDS="\ arduino_zero \ circuitplayground_express \ @@ -16,41 +19,42 @@ feather_m0_rfm9x \ feather_m4_express \ feather_nrf52832 \ feather_nrf52840_express \ -grandcentral_m4_express \ -pca10056 \ feather_radiofruit_zigbee \ gemma_m0 \ +grandcentral_m4_express \ hallowing_m0_express \ itsybitsy_m0_express \ itsybitsy_m4_express \ metro_m0_express \ metro_m4_express \ +pca10056 \ +pca10059 \ pirkey_m0 \ -trinket_m0 \ trellis_m4_express \ +trinket_m0 \ " ROSIE_SETUPS="rosie-ci" PARALLEL="-j 5" -if [ "$TRAVIS" == "true" ]; then +if [[ "$TRAVIS" == "true" ]]; then PARALLEL="-j 2" fi -if [ -z "$TRAVIS_BOARD" ]; then +if [[ -z "$TRAVIS_BOARD" ]]; then boards=$HW_BOARDS else boards=$TRAVIS_BOARD fi version=`git describe --tags --exact-match` -if [ $? -ne 0 ]; then +if [[ $? -ne 0 ]]; then version=`date +%Y%m%d`-`git rev-parse --short HEAD` fi -if [ "$TRAVIS" == "true" ]; then +if [[ "$TRAVIS" == "true" ]]; then sha=$TRAVIS_COMMIT - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then version=`date +%Y%m%d`-`echo $TRAVIS_PULL_REQUEST_SHA | cut -c1-7` sha=$TRAVIS_PULL_REQUEST_SHA fi @@ -62,23 +66,18 @@ for board in $boards; do for language_file in $(ls locale/*.po); do language=$(basename -s .po $language_file) echo "Building $board for $language" - if [ $board == "feather_huzzah" ]; then - make $PARALLEL -C ports/esp8266 TRANSLATION=$language BOARD=feather_huzzah + if [[ $board == "feather_huzzah" ]]; then + make $PARALLEL -C ports/esp8266 TRANSLATION=$language BOARD=$board (( exit_status = exit_status || $? )) temp_filename=ports/esp8266/build/firmware-combined.bin extension=bin - elif [ $board == "feather_nrf52832" ]; then - make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=feather_nrf52832 + elif [[ $board == "feather_nrf52832" ]]; then + make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=$board (( exit_status = exit_status || $? )) temp_filename=ports/nrf/build-$board-s132/firmware.bin extension=bin - elif [ $board == "feather_nrf52840_express" ]; then - make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=feather_nrf52840_express SD=s140 - (( exit_status = exit_status || $? )) - temp_filename=ports/nrf/build-$board-s140/firmware.uf2 - extension=uf2 - elif [ $board == "pca10056" ]; then - make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=pca10056 SD=s140 + elif [[ $board == "feather_nrf52840_express" || $board == "pca10056" || $board == "pca10059" ]]; then + make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=$board SD=s140 (( exit_status = exit_status || $? )) temp_filename=ports/nrf/build-$board-s140/firmware.uf2 extension=uf2 @@ -94,7 +93,7 @@ for board in $boards; do cp $temp_filename $final_filename (( exit_status = exit_status || $? )) # Only upload to Rosie if its a pull request. - if [ "$TRAVIS" == "true" ]; then + if [[ "$TRAVIS" == "true" ]]; then for rosie in $ROSIE_SETUPS; do echo "Uploading to https://$rosie.ngrok.io/upload/$sha" curl -F "file=@$final_filename" https://$rosie.ngrok.io/upload/$sha |
