diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-12-31 17:43:33 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-12-31 17:43:33 -0700 |
commit | c52557f0a969e539138b0fdd4d7dd25f8795b509 (patch) | |
tree | 128bcfab061bc5f7c703dbbfed9ec6c209e71f7e /bin/post-commit | |
parent | dd2b6e83987786dbd53113fa984630119334925d (diff) |
wip
Diffstat (limited to 'bin/post-commit')
-rwxr-xr-x | bin/post-commit | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/post-commit b/bin/post-commit new file mode 100755 index 0000000..6b72bd2 --- /dev/null +++ b/bin/post-commit @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +branch=$(git name-rev --name-only HEAD) +if [[ $branch == master ]]; then + + stash=false + if [[ -n "$(git status --porcelain)" ]]; then + stash=true + git add . + git stash + fi + + git checkout pre-generated + git merge master -m 'bogus' + rm -rf out + make --always-make -j12 + git add . + git commit --amend -m "make: $(git log -n1 master --pretty=format:%B)" + git checkout master + + if $stash; then + git stash pop + fi + +fi |