Updated script/lint (#12600)

* Compare to common ancestor
* Check if no file was changed
This commit is contained in:
cdce8p 2018-02-23 00:22:59 +01:00 committed by Paulus Schoutsen
parent 87c69452f9
commit ffd3889271
1 changed files with 6 additions and 2 deletions

View File

@ -4,10 +4,14 @@
cd "$(dirname "$0")/.."
if [ "$1" = "--changed" ]; then
export files="`git diff upstream/dev --name-only | grep -e '\.py$'`"
export files="`git diff upstream/dev... --name-only | grep -e '\.py$'`"
echo "================================================="
echo "FILES CHANGED (git diff upstream/dev --name-only)"
echo "FILES CHANGED (git diff upstream/dev... --name-only)"
echo "================================================="
if $files >/dev/null; then
echo "No python file changed"
exit
fi
printf "%s\n" $files
echo "================"
echo "LINT with flake8"