Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430845
pre-commit.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
559 B
Referenced Files
None
Subscribers
None
pre-commit.sh
View Options
#!/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
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, May 16, 19:40 (3 h, 57 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/98/ef9330c91d5875fb3d43db97cd5f
Default Alt Text
pre-commit.sh (559 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment