summaryrefslogtreecommitdiff
path: root/bin/post-commit
diff options
context:
space:
mode:
Diffstat (limited to 'bin/post-commit')
-rwxr-xr-xbin/post-commit25
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