Skip to content

Commit

Permalink
only run flow check in CI if npm 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Feb 3, 2016
1 parent 16b2357 commit 04a8f0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test-cov: clean
test-ci:
make lint
NODE_ENV=test make bootstrap
./node_modules/.bin/flow check
node scripts/run-flow-check.js
./scripts/test-cov.sh
cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js

Expand Down
11 changes: 11 additions & 0 deletions scripts/run-flow-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

var binVersionCheck = require("bin-version-check");

// run in npm 3+ only
binVersionCheck("npm", ">=3.3.0", function (err) {
if (!err) {
console.log("Running ./node_modules/.bin/flow check");
require("child_process").execSync('./node_modules/.bin/flow check');
}
});

0 comments on commit 04a8f0d

Please sign in to comment.