Page MenuHomeWickedGov Phorge

pre-commit.sh
No OneTemporary

Size
559 B
Referenced Files
None
Subscribers
None

pre-commit.sh

#!/usr/bin/env bash
# If the VE core sub-module was touched
if git diff --quiet --cached lib/ve; then
GITBRANCH=`git rev-parse --abbrev-ref HEAD`;
# … and it doesn't look like
if [[ $GITBRANCH != "sync-repos" ]]; then
echo "VE core sub-module was touched but commit isn't from 'sync-repos'.";
exit 1;
fi
fi
# Stash any uncommited changes
git stash -q --keep-index
npm install || git stash pop -q && exit 1
npm test && git add -u .docs/* || git stash pop -q && exit 1
# Re-apply any uncommited changes
git stash pop -q

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, May 16, 19:40 (3 h, 47 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/98/ef9330c91d5875fb3d43db97cd5f
Default Alt Text
pre-commit.sh (559 B)

Event Timeline