Files
PlantCtrl/Software/MainBoard/rust/all.sh
ju6ge 658efd30bb improve build scripts
- use shebang
- use pushd/popd
- add npm install to initialize node project dependencies
2025-10-18 18:40:27 +02:00

17 lines
601 B
Bash
Executable File

#!/usr/bin/env bash
rm ./src/webserver/index.html.gz
rm ./src/webserver/bundle.js.gz
set -e
pushd ./src_webpack/
npm install
npx webpack build
cp index.html.gz ../src/webserver/index.html.gz
cp bundle.js.gz ../src/webserver/bundle.js.gz
popd
cargo build --release
espflash save-image --bootloader bootloader.bin --partition-table partitions.csv --chip esp32c6 target/riscv32imac-unknown-none-elf/release/plant-ctrl2 image.bin
espflash flash --monitor --bootloader bootloader.bin --chip esp32c6 --baud 921600 --partition-table partitions.csv target/riscv32imac-unknown-none-elf/release/plant-ctrl2