First pass for scripts to rule them all

This commit is contained in:
Paulus Schoutsen committed 2015-09-17 00:35:26 -07:00
1 parent 3947ed3c2b
commit 8c77418b6a
18 files changed
+52 -44

No files matched your search

+1 -8
View File
@@ -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
View File
@@ -0,0 +1,4 @@
cd "$(dirname "$0")/.."
script/bootstrap_server
script/bootstrap_frontend
+5
View 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
View 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
Executable
+3
View File
@@ -0,0 +1,3 @@
script/bootstrap_server
script/test coverage
coveralls
+1 -4
View File
@@ -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
File renamed without changes.
View File
File renamed without changes.
Executable
+9
View 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
Executable
+3
View File
@@ -0,0 +1,3 @@
cd "$(dirname "$0")/.."
python3 -m homeassistant -c config
Executable
+4
View File
@@ -0,0 +1,4 @@
cd "$(dirname "$0")/.."
git submodule init
script/bootstrap
+5 -4
View File
@@ -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
Executable
+4
View File
@@ -0,0 +1,4 @@
cd "$(dirname "$0")/.."
git pull
git submodule update
-9
View File
@@ -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
-6
View File
@@ -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"