forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created script to aggregate return status
- See travis-ci/travis-build#67 - Aggregates return status for each command, and exits with non-zero status if any single command has a non-zero status
- Loading branch information
1 parent
937098e
commit b6d34e3
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
cd "$(dirname $(dirname "$0"))" | ||
php ./tests/run-tests.php | ||
testresults=$? | ||
cslibrary=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 library); if [[ $cslibrary ]];then while read -r line;do echo -e "\e[00;31m$line\e[00m"; done <<< "$cslibrary"; false; fi; | ||
cstests=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 tests); if [[ $cstests ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$cstests"; false; fi; | ||
csbin=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 bin); if [[ $csbin ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$csbin"; false; fi; | ||
|
||
if [[ "$testresults" ]]; then | ||
exit 1 ; | ||
fi | ||
if [[ "$cslibrary" ]]; then | ||
exit 1 ; | ||
fi | ||
if [[ "$cstests" ]]; then | ||
exit 1 ; | ||
fi | ||
if [[ "$csbin" ]]; then | ||
exit 1 ; | ||
fi | ||
|
||
exit 0 |