17 lines
329 B
Bash
Executable File
17 lines
329 B
Bash
Executable File
#!/bin/bash
|
|
set -e;
|
|
git diff --cached --name-only | grep -q '.js$' && found=1
|
|
if [ $found == 1 ]; then
|
|
make lint-js || exit 1
|
|
npm run test --prefix client || exit 1
|
|
fi
|
|
|
|
found=0
|
|
git diff --cached --name-only | grep -q '.go$' && found=1
|
|
if [ $found == 1 ]; then
|
|
make lint-go || exit 1
|
|
go test ./... || exit 1
|
|
fi
|
|
|
|
exit 0;
|