Update build of frontend
This commit is contained in:
parent
57271a764f
commit
cf2db71dd3
2 changed files with 12 additions and 3 deletions
|
@ -73,9 +73,11 @@ BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH}
|
||||||
WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/hassio-frontend
|
WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/hassio-frontend
|
||||||
|
|
||||||
echo "[INFO] Checkout hass.io repository"
|
echo "[INFO] Checkout hass.io repository"
|
||||||
git clone "$REPOSITORY" "$WORKSPACE"
|
if [ ! -d "$WORKSPACE" ]; then
|
||||||
cd "$WORKSPACE" && git checkout "$BRANCH"
|
git clone "$REPOSITORY" "$WORKSPACE"
|
||||||
git submodule update --init --recursive
|
cd "$WORKSPACE" && git checkout "$BRANCH"
|
||||||
|
git submodule update --init --recursive
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[INFO] Start frontend build"
|
echo "[INFO] Start frontend build"
|
||||||
docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true
|
docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# install nvm
|
||||||
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||||
|
|
||||||
# build frontend
|
# build frontend
|
||||||
cd home-assistant-polymer
|
cd home-assistant-polymer
|
||||||
|
nvm install
|
||||||
|
nvm use
|
||||||
yarn
|
yarn
|
||||||
./node_modules/.bin/bower install --allow-root
|
./node_modules/.bin/bower install --allow-root
|
||||||
yarn run frontend_prod
|
yarn run frontend_prod
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue