Skip to content

Commit

Permalink
chore(qa): add separate git hook for build + flow
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Jan 22, 2019
1 parent 84ba869 commit f2963c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .githooks/pre-commit.8.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ set -e

if [ -n "$JS_STAGED" ] || [ -n "$SNAPSHOT_STAGED" ];
then
npx flow
npm run test:coverage -s
npm run test:coverage -s
fi
9 changes: 9 additions & 0 deletions .githooks/pre-commit.9.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

FLOW_STAGED=$(grep -e '.flowconfig$' <<< "$STAGED" || true)

if [ -n "$JS_STAGED" ] || [ -n "$FLOW_STAGED" ];
then
npm run dist
npx flow
fi

0 comments on commit f2963c9

Please sign in to comment.