| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # If the VE core sub-module was touched |
| 4 | if git diff --quiet --cached lib/ve; then |
| 5 | |
| 6 | GITBRANCH=`git rev-parse --abbrev-ref HEAD`; |
| 7 | |
| 8 | # … and it doesn't look like |
| 9 | if [[ $GITBRANCH != "sync-repos" ]]; then |
| 10 | echo "VE core sub-module was touched but commit isn't from 'sync-repos'."; |
| 11 | exit 1; |
| 12 | fi |
| 13 | |
| 14 | fi |
| 15 | |
| 16 | # Stash any uncommited changes |
| 17 | git stash -q --keep-index |
| 18 | |
| 19 | npm install || git stash pop -q && exit 1 |
| 20 | npm test && git add -u .docs/* || git stash pop -q && exit 1 |
| 21 | |
| 22 | # Re-apply any uncommited changes |
| 23 | git stash pop -q |