fix(hooks): patch shebang
This commit is contained in:
parent
c68afdd97a
commit
10f5344bf2
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# This commit hook checks whether we ran `yarn build` when committed TypeScript files.
|
# This commit hook checks whether we ran `yarn build` when committed TypeScript files.
|
||||||
# For GitHub actions to work, we need to check the compiled JavaScript into VCS.
|
# For GitHub actions to work, we need to check the compiled JavaScript into VCS.
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
TS_FILES=$(git diff --staged --name-only | grep '\.ts' | grep -cv '__tests__')
|
TS_FILES=$(git diff --staged --name-only | grep '\.ts' | grep -cv '__tests__')
|
||||||
DIST_MODIFIED=$(git diff --staged --name-only | grep -c dist/index.js)
|
DIST_MODIFIED=$(git diff --staged --name-only | grep -c dist/index.js)
|
||||||
|
|
||||||
if [ $TS_FILES -gt 0 ] && [ $DIST_MODIFIED -eq 0 ] ; then
|
if [ "$TS_FILES" -gt 0 ] && [ "$DIST_MODIFIED" -eq 0 ] ; then
|
||||||
echo "You modified TypeScript files but apparently did not run 'yarn build'".
|
echo "You modified TypeScript files but apparently did not run 'yarn build'".
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue