|
|
- #!/bin/bash
-
- mv platformio.ini platformio.backup
- cp platformio.custom.ini platformio.ini
-
- # Environments to build
- ENVIRONMENTS="sonoff-debug sonoff-dht22-debug sonoff-ds18b20-debug s20-debug sonoff-pow-debug slampher-debug"
-
- # Get current version
- version=`cat src/config/version.h | grep APP_VERSION | awk '{print $3}' | sed 's/"//g'`
- echo $version
-
- # Create output folder
- mkdir -p firmware
-
- # Build all the required firmwares
- for environment in $ENVIRONMENTS; do
- platformio run -vv -e $environment
- mv .pioenvs/$environment/firmware.bin firmware/espurna-$version-$environment.bin
- done
-
- platformio run -vv -t uploadfs -e node-debug
- mv .pioenvs/node-debug/spiffs.bin firmware/espurna-$version-spiffs.bin
-
- mv platformio.backup platformio.ini
|