mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
(web.ui.sh): use npm for installation of webui
This commit is contained in:
parent
b402ee4c5f
commit
4523db7036
1 changed files with 9 additions and 14 deletions
|
@ -150,17 +150,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
|
||||
echo "# Compile WebUI"
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
if ! npm install --global yarn; then
|
||||
echo "error='install yarn failed'"
|
||||
if ! npm install; then
|
||||
echo "error='npm install failed'"
|
||||
exit 1
|
||||
fi
|
||||
yarn config set --home enableTelemetry 0
|
||||
if ! yarn install; then
|
||||
echo "error='yarn install failed'"
|
||||
exit 1
|
||||
fi
|
||||
if ! yarn build; then
|
||||
echo "error='yarn build failed'"
|
||||
if ! npm run build; then
|
||||
echo "error='npm run build failed'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -191,8 +186,8 @@ if [ "$1" = "update" ]; then
|
|||
git reset --hard origin/${currentBranch}
|
||||
newCommit=$(git rev-parse HEAD)
|
||||
if [ "${oldCommit}" != "${newCommit}" ]; then
|
||||
yarn install
|
||||
yarn build
|
||||
npm install
|
||||
npm run build
|
||||
sudo rm -r /var/www/public/* 2>/dev/null
|
||||
sudo cp -r /home/blitzapi/blitz_web/build/* /var/www/public
|
||||
sudo chown www-data:www-data -R /var/www/public
|
||||
|
|
Loading…
Add table
Reference in a new issue