diff options
Diffstat (limited to '')
| -rwxr-xr-x | olamic-worker | 25 |
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="$?" |
