First pass for scripts to rule them all
parent
3947ed3c2b
commit
8c77418b6a
|
@ -2,12 +2,5 @@ sudo: false
|
|||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
install:
|
||||
- pip install -r requirements_all.txt
|
||||
- pip install flake8 pylint coveralls
|
||||
script:
|
||||
- flake8 homeassistant
|
||||
- pylint homeassistant
|
||||
- coverage run -m unittest discover tests
|
||||
after_success:
|
||||
- coveralls
|
||||
- script/cibuild
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
cd "$(dirname "$0")/.."
|
||||
|
||||
script/bootstrap_server
|
||||
script/bootstrap_frontend
|
|
@ -0,0 +1,5 @@
|
|||
echo "Bootstrapping frontend..."
|
||||
cd homeassistant/components/frontend/www_static/home-assistant-polymer
|
||||
npm install
|
||||
npm run setup_js_dev
|
||||
cd ../../../../..
|
|
@ -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
|
||||
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
cd homeassistant/components/frontend/www_static/home-assistant-polymer
|
||||
npm install
|
||||
npm run frontend_prod
|
||||
|
||||
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
|
|
@ -3,10 +3,7 @@
|
|||
# apt-get install cython3 libudev-dev python-sphinx python3-setuptools
|
||||
# pip3 install cython
|
||||
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
if [ ! -d build ]; then
|
||||
mkdir build
|
|
@ -0,0 +1,3 @@
|
|||
script/bootstrap_server
|
||||
script/test coverage
|
||||
coveralls
|
|
@ -3,10 +3,7 @@
|
|||
# Optional: pass in a timezone as first argument
|
||||
# If not given will attempt to mount /etc/localtime
|
||||
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
docker build -t home-assistant-dev .
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
# Open a docker that can be used to debug/dev python-openzwave
|
||||
# Pass in a command line argument to build
|
||||
|
||||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
|
@ -0,0 +1,9 @@
|
|||
# Run style checks
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Checking style with flake8..."
|
||||
flake8 homeassistant
|
||||
|
||||
echo "Checking style with pylint..."
|
||||
pylint homeassistant
|
|
@ -0,0 +1,3 @@
|
|||
cd "$(dirname "$0")/.."
|
||||
|
||||
python3 -m homeassistant -c config
|
|
@ -0,0 +1,4 @@
|
|||
cd "$(dirname "$0")/.."
|
||||
|
||||
git submodule init
|
||||
script/bootstrap
|
|
@ -1,10 +1,11 @@
|
|||
# If current pwd is scripts, go 1 up.
|
||||
if [ ${PWD##*/} == "scripts" ]; then
|
||||
cd ..
|
||||
fi
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Running tests..."
|
||||
|
||||
if [ "$1" = "coverage" ]; then
|
||||
coverage run -m unittest discover tests
|
||||
else
|
||||
python3 -m unittest discover tests
|
||||
fi
|
||||
|
||||
script/lint
|
|
@ -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…
Reference in New Issue