Switch from bash to sh for black wrapper.

This commit is contained in:
Dan Helfman 2018-10-15 09:25:57 -07:00
parent 1ab44d4201
commit e323290e61
2 changed files with 6 additions and 12 deletions

View File

@ -1,13 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env sh
set -e if which black; then
python_version=$(python --version)
if [[ "$python_version" =~ "Python 3.5." ]]; then
echo "Skipping black due to lack of support for $python_version."
elif [[ "$python_version" =~ "Python 3.4." ]]; then
echo "Skipping black due to lack of support for $python_version."
else
black --skip-string-normalization --line-length 100 --check . black --skip-string-normalization --line-length 100 --check .
else
echo "Skipping black due to not being installed."
fi fi

View File

@ -5,11 +5,11 @@ skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
deps = -rtest_requirements.txt deps = -rtest_requirements.txt
whitelist_externals = bash whitelist_externals = sh
commands = commands =
py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \ py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \
tests [] tests []
bash scripts/black sh scripts/black
flake8 . flake8 .
[testenv:black] [testenv:black]