mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-06 16:27:12 +01:00
per https://docs.npmjs.com/cli/v7/commands/npm-exec#compatibility-with-older-npx-versions using --no / --no-install to avoid installing latest versions making sure ci_install handles that instead, since the specific version in set via the package.json (hopefully, npm docs actually mean that this will work)
36 lines
781 B
Bash
Executable File
36 lines
781 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x -e -v
|
|
|
|
cd code
|
|
|
|
case "$1" in
|
|
("host")
|
|
# runs PIO unit tests, using the host compiler
|
|
# (see https://github.com/ThrowTheSwitch/Unity)
|
|
pushd test
|
|
pio test
|
|
popd
|
|
;;
|
|
("webui")
|
|
# TODO: both can only parse one file at a time
|
|
npm exec --no eslint html/custom.js
|
|
npm exec --no html-validate html/index.html
|
|
# checks whether the webui can be built
|
|
./build.sh -f environments
|
|
git --no-pager diff --stat
|
|
;;
|
|
("build")
|
|
# run generic build test with the specified environment as base
|
|
scripts/test_build.py -e $2
|
|
;;
|
|
("release")
|
|
# TODO: pending removal in favour of code/scripts/generate_release_sh.py
|
|
./build.sh -r
|
|
;;
|
|
(*)
|
|
echo -e "\e[1;33mUnknown stage name, exiting!\e[0m"
|
|
exit 1
|
|
;;
|
|
esac
|