Bumped numpy from 1.13.1 to 1.14.0 to satisfy TF 1.12.2 dependency. Updated grep commands in validator to also be compatible with BSD.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# ln -s ../../script/git-hooks/pre-commit ./pre-commit
|
||||
|
||||
|
||||
FILES=$(git diff --name-only --cached --diff-filter=d | grep -E '*\.(py|java)$')
|
||||
FILES=$(git diff --name-only --cached --diff-filter=d | grep -E '.*\.(py|java)$')
|
||||
|
||||
WEBSITE_TESTS_RESULT=0
|
||||
ANALYSIS_TESTS_RESULT=0
|
||||
|
||||
@@ -206,15 +206,15 @@ def validate_dir(root_dir):
|
||||
def get_git_files(state):
|
||||
if state == 'staged':
|
||||
# Files staged for commit
|
||||
cmd = r"git diff --name-only --cached --diff-filter=d | grep -E '*\.(py|java)$'"
|
||||
cmd = r"git diff --name-only --cached --diff-filter=d | grep -E '.*\.(py|java)$'"
|
||||
|
||||
elif state == 'unstaged':
|
||||
# Tracked files not staged for commit
|
||||
cmd = r"git diff --name-only --diff-filter=d | grep -E '*\.(py|java)$'"
|
||||
cmd = r"git diff --name-only --diff-filter=d | grep -E '.*\.(py|java)$'"
|
||||
|
||||
elif state == 'untracked':
|
||||
# Untracked files not staged for commit
|
||||
cmd = r"git ls-files --other --exclude-standard | grep -E '*\.(py|java)$'"
|
||||
cmd = r"git ls-files --other --exclude-standard | grep -E '.*\.(py|java)$'"
|
||||
|
||||
with settings(warn_only=True):
|
||||
res = local(cmd, capture=True)
|
||||
|
||||
Reference in New Issue
Block a user