mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
First pass for scripts to rule them all
This commit is contained in:
parent
3947ed3c2b
commit
8c77418b6a
@ -2,12 +2,5 @@ sudo: false
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.4"
|
- "3.4"
|
||||||
install:
|
|
||||||
- pip install -r requirements_all.txt
|
|
||||||
- pip install flake8 pylint coveralls
|
|
||||||
script:
|
script:
|
||||||
- flake8 homeassistant
|
- script/cibuild
|
||||||
- pylint homeassistant
|
|
||||||
- coverage run -m unittest discover tests
|
|
||||||
after_success:
|
|
||||||
- coveralls
|
|
||||||
|
4
script/bootstrap
Executable file
4
script/bootstrap
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
script/bootstrap_server
|
||||||
|
script/bootstrap_frontend
|
5
script/bootstrap_frontend
Executable file
5
script/bootstrap_frontend
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
echo "Bootstrapping frontend..."
|
||||||
|
cd homeassistant/components/frontend/www_static/home-assistant-polymer
|
||||||
|
npm install
|
||||||
|
npm run setup_js_dev
|
||||||
|
cd ../../../../..
|
10
script/bootstrap_server
Normal file
10
script/bootstrap_server
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
echo "Update the submodule to latest version..."
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
echo "Installing dependencies..."
|
||||||
|
python3 -m pip install --upgrade -r requirements_all.txt
|
||||||
|
|
||||||
|
echo "Installing development dependencies.."
|
||||||
|
python3 -m pip install --upgrade flake8 pylint coveralls py.test
|
@ -1,12 +1,8 @@
|
|||||||
# Builds the frontend for production
|
# Builds the frontend for production
|
||||||
|
|
||||||
# If current pwd is scripts, go 1 up.
|
cd "$(dirname "$0")/.."
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd homeassistant/components/frontend/www_static/home-assistant-polymer
|
cd homeassistant/components/frontend/www_static/home-assistant-polymer
|
||||||
npm install
|
|
||||||
npm run frontend_prod
|
npm run frontend_prod
|
||||||
|
|
||||||
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
|
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
|
@ -3,10 +3,7 @@
|
|||||||
# apt-get install cython3 libudev-dev python-sphinx python3-setuptools
|
# apt-get install cython3 libudev-dev python-sphinx python3-setuptools
|
||||||
# pip3 install cython
|
# pip3 install cython
|
||||||
|
|
||||||
# If current pwd is scripts, go 1 up.
|
cd "$(dirname "$0")/.."
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d build ]; then
|
if [ ! -d build ]; then
|
||||||
mkdir build
|
mkdir build
|
3
script/cibuild
Executable file
3
script/cibuild
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
script/bootstrap_server
|
||||||
|
script/test coverage
|
||||||
|
coveralls
|
@ -3,10 +3,7 @@
|
|||||||
# Optional: pass in a timezone as first argument
|
# Optional: pass in a timezone as first argument
|
||||||
# If not given will attempt to mount /etc/localtime
|
# If not given will attempt to mount /etc/localtime
|
||||||
|
|
||||||
# If current pwd is scripts, go 1 up.
|
cd "$(dirname "$0")/.."
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build -t home-assistant-dev .
|
docker build -t home-assistant-dev .
|
||||||
|
|
@ -1,10 +1,7 @@
|
|||||||
# Open a docker that can be used to debug/dev python-openzwave
|
# Open a docker that can be used to debug/dev python-openzwave
|
||||||
# Pass in a command line argument to build
|
# Pass in a command line argument to build
|
||||||
|
|
||||||
# If current pwd is scripts, go 1 up.
|
cd "$(dirname "$0")/.."
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -gt 0 ]
|
if [ $# -gt 0 ]
|
||||||
then
|
then
|
0
scripts/hass-daemon → script/hass-daemon
Normal file → Executable file
0
scripts/hass-daemon → script/hass-daemon
Normal file → Executable file
9
script/lint
Executable file
9
script/lint
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
# Run style checks
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
echo "Checking style with flake8..."
|
||||||
|
flake8 homeassistant
|
||||||
|
|
||||||
|
echo "Checking style with pylint..."
|
||||||
|
pylint homeassistant
|
3
script/server
Executable file
3
script/server
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
python3 -m homeassistant -c config
|
4
script/setup
Executable file
4
script/setup
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
git submodule init
|
||||||
|
script/bootstrap
|
@ -1,10 +1,11 @@
|
|||||||
# If current pwd is scripts, go 1 up.
|
cd "$(dirname "$0")/.."
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
echo "Running tests..."
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "coverage" ]; then
|
if [ "$1" = "coverage" ]; then
|
||||||
coverage run -m unittest discover tests
|
coverage run -m unittest discover tests
|
||||||
else
|
else
|
||||||
python3 -m unittest discover tests
|
python3 -m unittest discover tests
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
script/lint
|
4
script/update
Executable file
4
script/update
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
git pull
|
||||||
|
git submodule update
|
@ -1,9 +0,0 @@
|
|||||||
# Run style checks
|
|
||||||
|
|
||||||
# If current pwd is scripts, go 1 up.
|
|
||||||
if [ ${PWD##*/} == "scripts" ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
flake8 homeassistant
|
|
||||||
pylint homeassistant
|
|
@ -1,6 +0,0 @@
|
|||||||
echo "The update script has been deprecated since Home Assistant v0.7"
|
|
||||||
echo
|
|
||||||
echo "Home Assistant is now distributed via PyPi and can be installed and"
|
|
||||||
echo "upgraded by running: pip3 install --upgrade homeassistant"
|
|
||||||
echo
|
|
||||||
echo "If you are developing a new feature for Home Assistant, run: git pull"
|
|
Loading…
x
Reference in New Issue
Block a user