mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Attempt to fix CI scripts
This commit is contained in:
parent
19d40612e6
commit
0d09e2e1df
@ -5,14 +5,15 @@ cd "$(dirname "$0")/.."
|
|||||||
echo "Checking style with flake8..."
|
echo "Checking style with flake8..."
|
||||||
flake8 --exclude www_static homeassistant
|
flake8 --exclude www_static homeassistant
|
||||||
|
|
||||||
STATUS=$?
|
FLAKE8_STATUS=$?
|
||||||
|
|
||||||
echo "Checking style with pylint..."
|
echo "Checking style with pylint..."
|
||||||
pylint homeassistant
|
pylint homeassistant
|
||||||
|
PYLINT_STATUS=$?
|
||||||
|
|
||||||
if [ $STATUS -eq 0 ]
|
if [ $FLAKE8_STATUS -eq 0 ]
|
||||||
then
|
then
|
||||||
exit $?
|
exit $FLAKE8_STATUS
|
||||||
else
|
else
|
||||||
exit $STATUS
|
exit $PYLINT_STATUS
|
||||||
fi
|
fi
|
||||||
|
21
script/release
Executable file
21
script/release
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
# Pushes a new version to PyPi
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
head -n 3 homeassistant/const.py | tail -n 1 | grep dev
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "Release version should not contain dev tag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
|
||||||
|
if [ "$CURRENT_BRANCH" != "master" ]
|
||||||
|
then
|
||||||
|
echo "You have to be on the master branch to release."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
python3 setup.py sdist bdist_wheel upload
|
10
script/test
10
script/test
@ -7,19 +7,21 @@ cd "$(dirname "$0")/.."
|
|||||||
|
|
||||||
script/lint
|
script/lint
|
||||||
|
|
||||||
STATUS=$?
|
LINT_STATUS=$?
|
||||||
|
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
|
|
||||||
if [ "$1" = "coverage" ]; then
|
if [ "$1" = "coverage" ]; then
|
||||||
py.test --cov --cov-report=
|
py.test --cov --cov-report=
|
||||||
|
TEST_STATUS=$?
|
||||||
else
|
else
|
||||||
py.test
|
py.test
|
||||||
|
TEST_STATUS=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $STATUS -eq 0 ]
|
if [ $LINT_STATUS -eq 0 ]
|
||||||
then
|
then
|
||||||
exit $?
|
exit $TEST_STATUS
|
||||||
else
|
else
|
||||||
exit $STATUS
|
exit $LINT_STATUS
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user