diff --git a/bin/deploy_pip.sh b/bin/deploy_pip.sh index c5eea2d..f35a461 100755 --- a/bin/deploy_pip.sh +++ b/bin/deploy_pip.sh @@ -6,13 +6,18 @@ cd .. ./bin/clean.sh -python setup.py sdist bdist_wheel -git add . -git commit -git push +if ./bin/run_tests.sh; then + python setup.py sdist bdist_wheel -git tag $(cat .version) -git push -u origin $(cat .version) + git add . + git commit + git push -twine upload dist/* \ No newline at end of file + git tag $(cat .version) + git push -u origin $(cat .version) + + twine upload dist/* +else + echo ">>> Stopped due to test failure!" +fi diff --git a/bin/run_tests.sh b/bin/run_tests.sh index b7d45aa..9e34f4f 100755 --- a/bin/run_tests.sh +++ b/bin/run_tests.sh @@ -5,5 +5,9 @@ cd $WK_DIR cd .. for filename in ./tests/test*.py; do - python $filename + if python $filename ; then + echo woohoo + else + exit 1 + fi done \ No newline at end of file