summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-29 19:08:45 -0400
committerAndrew Cady <d@jerkface.net>2019-07-29 19:09:03 -0400
commit2e2c4440cbdf967764aae22888df026bb1fc6a74 (patch)
tree7ff345fc19d5e8788fb275bdea43c174f676329a
parentb97c9e45ff37ee6d6135a525a3c784136adcf188 (diff)
checkout and run make
-rw-r--r--Makefile12
-rwxr-xr-xhooks/post-receive11
2 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..71acace
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
1all: build install reload
2
3.PHONY: build install reload
4
5build:
6 stack build --test
7
8install:
9 stack install
10
11reload:
12 systemctl --user reload anomic
diff --git a/hooks/post-receive b/hooks/post-receive
index 72dc81d..7f66079 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -15,5 +15,16 @@ warn()
15 fi 15 fi
16} 16}
17 17
18die()
19{
20 printf '%s: Error: %s\n' "$0" "$*" >&2
21 exit 1
22}
23
18GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\* 24GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\*
19 25
26export GIT_WORK_TREE=${GIT_DIR%.git}
27
28git checkout -f master || die 'command failed: git checkout'
29cd "$GIT_WORK_TREE" || die 'command failed: cd $GIT_WORK_TREE'
30make