summaryrefslogtreecommitdiff
path: root/olamic-worker
diff options
context:
space:
mode:
authorJulian Blake Kongslie2020-11-25 09:05:18 -0800
committerJulian Blake Kongslie2020-11-25 10:51:38 -0800
commit6e03668c415c83a8a83218fcb96dc430d9eebaed (patch)
treeec6294e91a5938445e068e3d98e571946dc3b06d /olamic-worker
parentInitial version. (diff)
downloadolamic-6e03668c415c83a8a83218fcb96dc430d9eebaed.tar.xz
Change the example githook to remove a level of indirection.
Diffstat (limited to 'olamic-worker')
-rwxr-xr-xolamic-worker25
1 files changed, 15 insertions, 10 deletions
diff --git a/olamic-worker b/olamic-worker
index 942151a..c9a1bd0 100755
--- a/olamic-worker
+++ b/olamic-worker
@@ -31,21 +31,26 @@ while true; do
31 31
32 set +e 32 set +e
33 ( 33 (
34 set -ex 34 set -e
35 35
36 GIT_DIR=cache.git git fetch "$GIT_REPO" "$GIT_OBJECT" 36 (
37 set -x
38
39 GIT_DIR=cache.git git fetch "$GIT_REPO" "$GIT_OBJECT"
37 40
38 rm -rf work 41 rm -rf work
39 mkdir work 42 mkdir work
40 cd work 43 cd work
41 44
42 git clone --shared "$OLAMIC_WORKER_DIR"/cache.git checkout 45 git clone --shared "$OLAMIC_WORKER_DIR"/cache.git checkout
43 cd checkout 46 cd checkout
44 git config advice.detachedHead false 47 git config advice.detachedHead false
45 git checkout -f "$GIT_OBJECT" 48 git checkout -f "$GIT_OBJECT"
49 )
46 50
47 ( 51 (
48 eval "$TASK_SCRIPT" 52 cd work/checkout
53 eval "set -x; $TASK_SCRIPT"
49 ) 54 )
50 ) 2>&1 | tee log 55 ) 2>&1 | tee log
51 STATUS="$?" 56 STATUS="$?"