mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-06 00:14:19 +01:00
Install the platform explicitly, since the recent version does not do it anymore (which is hopefully a bug)
42 lines
509 B
Bash
Executable File
42 lines
509 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x -e -v
|
|
|
|
npm_install() {
|
|
npm install -g npm@latest
|
|
npm ci
|
|
}
|
|
|
|
pio_install() {
|
|
pip3 install -U platformio
|
|
pio upgrade --dev
|
|
pio platform update -p
|
|
}
|
|
|
|
host_install() {
|
|
pio platform install native
|
|
}
|
|
|
|
cd code
|
|
|
|
case "$1" in
|
|
("host")
|
|
pio_install
|
|
host_install
|
|
;;
|
|
("webui")
|
|
npm_install
|
|
;;
|
|
("build")
|
|
pio_install
|
|
;;
|
|
("release")
|
|
npm_install
|
|
pio_install
|
|
;;
|
|
(*)
|
|
echo -e "\e[1;33mUnknown stage name, exiting!\e[0m"
|
|
exit 1
|
|
;;
|
|
esac
|