Log deployment polling errors
This commit is contained in:
+3
-2
@@ -8,9 +8,10 @@ LOG_FILE="$APP_DIR/data/deploy.log"
|
|||||||
mkdir -p "$APP_DIR/data"
|
mkdir -p "$APP_DIR/data"
|
||||||
cd "$APP_DIR"
|
cd "$APP_DIR"
|
||||||
|
|
||||||
remote_rev="$(git -c credential.helper="store --file=/var/services/homes/whitekomani/.git-credentials" ls-remote origin refs/heads/main | awk '{print $1}')"
|
remote_output="$(git -c credential.helper="store --file=/var/services/homes/whitekomani/.git-credentials" ls-remote origin refs/heads/main 2>&1 || true)"
|
||||||
|
remote_rev="$(printf '%s\n' "$remote_output" | awk '/refs\/heads\/main$/ {print $1}')"
|
||||||
if [ -z "$remote_rev" ]; then
|
if [ -z "$remote_rev" ]; then
|
||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') no remote revision found" >> "$LOG_FILE"
|
echo "$(date '+%Y-%m-%d %H:%M:%S') no remote revision found: $remote_output" >> "$LOG_FILE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user