Skip to content

Commit ee9292e

Browse files
Aaron SoellingerAaron Soellinger
authored andcommitted
added command to exit travis build on error
1 parent 3fe2728 commit ee9292e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/test.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
#!/bin/bash
2-
32
# Run this script test.sh from project root directory containing setup.py
3+
4+
set -ev
5+
46
pr_branch=$1
5-
if ["${pr_branch}" == "false"]:
7+
if [ "${pr_branch}" == "false" ]
68
then
79
exit 0
810
fi
911

12+
echo "PR: branch passed in: $pr_branch"
1013
pip3 install .
1114
git checkout ${pr_branch}
1215
pr_version=$(python3 -c "import mplfinance; print(mplfinance.__version__)")
1316
git checkout master
1417
in_version=$(python3 -c "import mplfinance; print(mplfinance.__version__)")
1518
echo "PR: ${pr_version}; Incumbent: ${in_version}"
1619
result=$(python3 -m mplfinance.check_version --pr ${pr_version} --in ${in_version})
17-
tox
18-
if ["${result}" != "VersionCheck:pr>master"]
20+
if [ "${result}" != "VersionCheck:pr>master" ]
1921
then
2022
# version in PR doesn't pass the test
2123
echo "${result}"

0 commit comments

Comments
 (0)