From b241180aa85ad81f4ee0dca9bf3c0429916a6a18 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sun, 11 May 2025 15:36:49 -0700 Subject: Significantly improve traceability and minor fixes. --- worker/scripts/fetch_code | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'worker/scripts/fetch_code') diff --git a/worker/scripts/fetch_code b/worker/scripts/fetch_code index d45f6db..d3af763 100755 --- a/worker/scripts/fetch_code +++ b/worker/scripts/fetch_code @@ -1,6 +1,21 @@ #!/bin/bash +export LOG_PREFIX="[fetch_code $remote @ $checkout -> $path]" + +log "fetch!" git clone "$remote" "$path" +if [ ! $? -eq 0 ]; then + log "D: failed to clone" + exit 1 +fi + cd "$path" +log "checkout $checkout" git reset --hard "$checkout" +if [ ! $? -eq 0 ]; then + log "D: can't reset to $checkout" + cd - + exit 1 +fi + cd - -- cgit v1.2.3-70-g09d2