-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: a git hook to update ic submodule on git pull
1 parent
ad33c2c
commit b0e0c99
Showing
2 changed files
with
23 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
BASEDIR=$(git rev-parse --show-toplevel) | ||
|
||
echo -n "Creating the post-merge hook file (also called after git pull)... " | ||
|
||
cat >"$BASEDIR/.git/hooks/post-merge" <<_EOF | ||
#!/bin/sh | ||
echo "Updating submodules" | ||
git submodule update --init --recursive | ||
_EOF | ||
|
||
# Make it executable | ||
chmod +x .git/hooks/post-merge | ||
|
||
echo done |