Last active
August 29, 2015 14:26
-
-
Save vamdt/56a45ae588deed42d949 to your computer and use it in GitHub Desktop.
php lint run in ci(jenkins)
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
#!/usr/bin/env bash | |
# APP_ROOT/deploy/ci_php_lint.sh | |
cd $(dirname $0) | |
cd .. | |
exit_code=0 | |
for i in $(git ls-files --ignored --exclude='**/*.php') | |
do | |
php -l $i | |
ex=$? | |
if [[ 0 != $ex ]]; then | |
exit_code=$ex | |
fi | |
done | |
# if exit_code not 0, then exit with error | |
exit $exit_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment