improve build scripts
- use shebang - use pushd/popd - add npm install to initialize node project dependencies
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
rm ./src/webserver/index.html.gz
|
rm ./src/webserver/index.html.gz
|
||||||
rm ./src/webserver/bundle.js.gz
|
rm ./src/webserver/bundle.js.gz
|
||||||
set -e
|
set -e
|
||||||
cd ./src_webpack/
|
|
||||||
|
pushd ./src_webpack/
|
||||||
|
npm install
|
||||||
npx webpack build
|
npx webpack build
|
||||||
cp index.html.gz ../src/webserver/index.html.gz
|
cp index.html.gz ../src/webserver/index.html.gz
|
||||||
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
||||||
cd ../
|
popd
|
||||||
|
|
||||||
cargo build --release
|
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 save-image --bootloader bootloader.bin --partition-table partitions.csv --chip esp32c6 target/riscv32imac-unknown-none-elf/release/plant-ctrl2 image.bin
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
rm ./src/webserver/index.html.gz
|
rm ./src/webserver/index.html.gz
|
||||||
rm ./src/webserver/bundle.js.gz
|
rm ./src/webserver/bundle.js.gz
|
||||||
set -e
|
set -e
|
||||||
cd ./src_webpack/
|
|
||||||
|
pushd ./src_webpack/
|
||||||
|
npm install
|
||||||
npx webpack build
|
npx webpack build
|
||||||
cp index.html.gz ../src/webserver/index.html.gz
|
cp index.html.gz ../src/webserver/index.html.gz
|
||||||
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
||||||
cd ../
|
popd
|
||||||
|
|
||||||
cargo build --release
|
cargo build --release
|
||||||
espflash flash --monitor --bootloader bootloader.bin --chip esp32c6 --baud 921600 --partition-table partitions.csv target/riscv32imac-unknown-none-elf/release/plant-ctrl2
|
espflash flash --monitor --bootloader bootloader.bin --chip esp32c6 --baud 921600 --partition-table partitions.csv target/riscv32imac-unknown-none-elf/release/plant-ctrl2
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
rm image.bin
|
rm image.bin
|
||||||
rm ./src/webserver/index.html.gz
|
rm ./src/webserver/index.html.gz
|
||||||
rm ./src/webserver/bundle.js.gz
|
rm ./src/webserver/bundle.js.gz
|
||||||
set -e
|
set -e
|
||||||
cd ./src_webpack/
|
|
||||||
|
pushd ./src_webpack/
|
||||||
|
npm install
|
||||||
npx webpack build
|
npx webpack build
|
||||||
cp index.html.gz ../src/webserver/index.html.gz
|
cp index.html.gz ../src/webserver/index.html.gz
|
||||||
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
cp bundle.js.gz ../src/webserver/bundle.js.gz
|
||||||
cd ../
|
popd
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|||||||
Reference in New Issue
Block a user