mirror of
https://github.com/home-assistant/core.git
synced 2026-04-21 23:36:18 +00:00
Put scripts in scripts folder
This commit is contained in:
27
scripts/build_frontend
Executable file
27
scripts/build_frontend
Executable file
@@ -0,0 +1,27 @@
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# To build the frontend, you need node, bower and vulcanize
|
||||
# npm install -g bower vulcanize
|
||||
|
||||
# Install dependencies
|
||||
cd homeassistant/components/http/www_static/polymer
|
||||
bower install
|
||||
cd ..
|
||||
cp polymer/bower_components/webcomponentsjs/webcomponents.min.js .
|
||||
|
||||
# Let Polymer refer to the minified JS version before we compile
|
||||
sed -i.bak 's/polymer\.js/polymer\.min\.js/' polymer/bower_components/polymer/polymer.html
|
||||
|
||||
vulcanize -o frontend.html --inline --strip polymer/splash-login.html
|
||||
|
||||
# Revert back the change to the Polymer component
|
||||
rm polymer/bower_components/polymer/polymer.html
|
||||
mv polymer/bower_components/polymer/polymer.html.bak polymer/bower_components/polymer/polymer.html
|
||||
|
||||
# Generate the MD5 hash of the new frontend
|
||||
cd ..
|
||||
echo '""" DO NOT MODIFY. Auto-generated by build_frontend script """' > frontend.py
|
||||
echo 'VERSION = "'`md5 -q www_static/frontend.html`'"' >> frontend.py
|
||||
7
scripts/check_style
Executable file
7
scripts/check_style
Executable file
@@ -0,0 +1,7 @@
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
pylint homeassistant
|
||||
flake8 homeassistant --exclude bower_components,external
|
||||
6
scripts/run_tests
Executable file
6
scripts/run_tests
Executable file
@@ -0,0 +1,6 @@
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
python3 -m unittest discover tests
|
||||
7
scripts/update
Executable file
7
scripts/update
Executable file
@@ -0,0 +1,7 @@
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
git pull --recurse-submodules=yes
|
||||
git submodule update --init --recursive
|
||||
Reference in New Issue
Block a user