jenkins-bot has submitted this change and it was merged.
Change subject: Fix grep errors on pre-commit (dev-scripts/pre-commit)
......................................................................
Fix grep errors on pre-commit (dev-scripts/pre-commit)
Under OS X grep does not have the -P (perl regexp), so these if statements were
not being executed and commiting was echoing grep errors.
Substituting it with the standard (at least OS X 10.9 and Ubuntu 13) --regexp
which uses a more basic regexp but that works just fine with this 3 regexps.
Tested with:
git ls-files | grep --regexp '\.js$'
git ls-files | grep --regexp '\.*php$'
git ls-files | grep --regexp 'includes/skins/.*php$'
Change-Id: Ice2c2a2326b0d329a712e2ab79fd53e61a6f56bc
---
M dev-scripts/pre-commit
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Robmoen: Looks good to me, approved
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/dev-scripts/pre-commit b/dev-scripts/pre-commit
index ba3a91b..68c7b14 100755
--- a/dev-scripts/pre-commit
+++ b/dev-scripts/pre-commit
@@ -19,15 +19,15 @@
make jshint || exit 1
make jscs || exit 1
-if git diff --name-only --cached | grep -P '\.js$' ; then
+if git diff --name-only --cached | grep --regexp '\.js$' ; then
make qunit || exit 1
fi
-if git diff --name-only --cached | grep -P '\.*php$' ; then
+if git diff --name-only --cached | grep --regexp '\.*php$' ; then
make phplint || exit 1
fi
-if git diff --name-only --cached | grep -P 'includes/skins/.*php$' ; then
+if git diff --name-only --cached | grep --regexp 'includes/skins/.*php$' ; then
make validatehtml > $result
fi
--
To view, visit https://gerrit.wikimedia.org/r/173042
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice2c2a2326b0d329a712e2ab79fd53e61a6f56bc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Robmoen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits