Skip to content

Commit

Permalink
build frontend on edge
Browse files Browse the repository at this point in the history
  • Loading branch information
kikeelectronico committed Jan 23, 2021
1 parent a5fc49f commit bfa36f3
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 116 deletions.
20 changes: 10 additions & 10 deletions bash/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case "$response" in
sudo apt install curl -y
sudo apt install mosquitto mosquitto-clients -y
sudo apt install redis-server -y
# sudo apt install npm -y
sudo apt install npm -y
echo "Install the new services."
echo "---------------------------------------------"
sudo cp configuration_templates/homeware.service /lib/systemd/system/
Expand All @@ -50,15 +50,15 @@ case "$response" in
sudo systemctl start homeware
sudo systemctl start homewareMQTT
sudo systemctl start homewareTasks
# echo
# read -r -p "Press enter to continue." e
# clear
# echo "Build UI."
# echo "---------------------------------------------"
# cd web
# npm install
# npm run build
# cd ../
echo
read -r -p "Press enter to continue." e
clear
echo "Build UI."
echo "---------------------------------------------"
cd front
sudo npm install
sudo npm run build
cd ../
echo
read -r -p "Press enter to continue." e
clear
Expand Down
9 changes: 6 additions & 3 deletions bash/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

echo "The upgrader has started.\r\n"

# Delete the build to generate a 500 error
sudo rm -r ../front/build

# Download the last version
LOCATION=$(curl -s https://api.github.com/repos/kikeelectronico/Homeware-LAN/releases/latest \
| grep "tag_name" \
Expand All @@ -23,9 +26,9 @@ mv Homeware-LAN-*/front/* ../front/
pip3 install -r requirements.txt

#Build the UI
# cd web
# npm install
# npm run build
cd ../front
sudo npm install
sudo npm run build

#Start services
sudo systemctl restart homewareMQTT
Expand Down
Loading

0 comments on commit bfa36f3

Please sign in to comment.