git hook script
This commit is contained in:
parent
c1d1876b41
commit
6d2043e19f
15
bin/git/submodule-update-master-commit
Executable file
15
bin/git/submodule-update-master-commit
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
git submodule update --remote --rebase --init
|
||||||
|
|
||||||
|
SUBMODULES=$(\
|
||||||
|
git status\
|
||||||
|
| grep '(new commits)' \
|
||||||
|
| sed 's/^.*modified:\s*//; s/\s*(new commits).*$//' \
|
||||||
|
)
|
||||||
|
|
||||||
|
[[ ${#SUBMODULES[@]} -gt 0 ]] && {
|
||||||
|
git add $SUBMODULES
|
||||||
|
git commit -m "Updated submodules to master : $SUBMODULES"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user