Hromadný build & upload na server

#452

Nástroje pro hromadný build firmware jsou v sw/shipard-iot/BUILD.

Nastavení

Pro úspěšný build je potřeba správně nastavený soubor local-config.json:

{
        "pioCmd": "/Users/$USER/.platformio/penv/bin/platformio",
        "remoteUser": "$USER",
        "remoteServer": "narci"
}
  1. Vzorový obsah je v souboru local-config.json.example,
  2. pioCmd uvádí cestu na platformIO; uvedený příklad by měl univerzálně fungovat pod Mac OS.

Hromadný build

cd sw/shipard-iot/
cd BUILD
./build.php build-all

Poslední příkaz by měl vypisovat průběh buildu:

### iot-box-lan-core ###
-> esp32-poe: iot-box-lan-core-esp32-poe-0.90.1-30c1f9b-fw.bin; 826384B; c2c9ac050c8779a56c29223d53e7cb78a880f52e
-> esp32-gateway: iot-box-lan-core-esp32-gateway-0.90.1-30c1f9b-fw.bin; 826400B; f04fbf8841f2ee706c830e5667c59e6c711c0599
-> esp32-wifi: iot-box-lan-core-esp32-wifi-0.90.1-30c1f9b-fw.bin; 922144B; c6fdb979b7691a705c6faf4f3e85ecf91a23984b

Upload na server

./build.php build-all --upload
### iot-box-lan-core ###
 -> esp32-poe: iot-box-lan-core-esp32-poe-0.90.1-30c1f9b-fw.bin; 826384B; c2c9ac050c8779a56c29223d53e7cb78a880f52e
 -> esp32-gateway: iot-box-lan-core-esp32-gateway-0.90.1-30c1f9b-fw.bin; 826400B; f04fbf8841f2ee706c830e5667c59e6c711c0599
 -> esp32-wifi: iot-box-lan-core-esp32-wifi-0.90.1-30c1f9b-fw.bin; 922144B; c6fdb979b7691a705c6faf4f3e85ecf91a23984b
--- UPLOAD ---
ssh -l $USER narci mkdir -p /var/www/webs/download.shipard.org/shipard-iot/fw/ib/stable/iot-box-lan-core/0.90.1-30c1f9b
scp fw/stable/ib//iot-box-lan-core/0.90.1-30c1f9b/* $USER@narci://var/www/webs/download.shipard.org/shipard-iot/fw/ib/stable/iot-box-lan-core/0.90.1-30c1f9b
scp fw/stable/ib//iot-box-lan-core//*.json $USER@narci://var/www/webs/download.shipard.org/shipard-iot/fw/ib/stable/iot-box-lan-core
scp fw/stable/ib//*.json $USER@narci://var/www/webs/download.shipard.org/shipard-iot/fw/ib/stable/
--- DONE ---