From d8f968e9dc019e3cba513e17f77cee0e50ce13a7 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc Date: Fri, 20 Dec 2024 17:31:53 -0700 Subject: [PATCH] Add before and after output for docker and git --- repo-converter/pull-start.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repo-converter/pull-start.sh b/repo-converter/pull-start.sh index dabf348..2febf28 100644 --- a/repo-converter/pull-start.sh +++ b/repo-converter/pull-start.sh @@ -41,9 +41,12 @@ exec > >(tee -a "$log_file") 2>&1 log "Script starting" log "Running as user: $USER" -log "On branch: $($git_cmd branch -v)" +log "On branch before git pull: $($git_cmd branch -v)" log "Docker compose file: $docker_compose_file_path" +log "docker ps before:" +$docker_cmd ps + command="\ $git_cmd reset --hard && \ $git_cmd pull --force && \ @@ -58,10 +61,12 @@ echo "$command" | awk 'BEGIN{FS="&&"; OFS="&& \n"} {$1=$1} 1' # Run the command bash -c "$command" >> "$log_file" 2>&1 +log "On branch after git pull: $($git_cmd branch -v)" + log "Sleeping $docker_up_sleep_seconds seconds to give Docker containers time to start and stabilize" sleep $docker_up_sleep_seconds -log "docker ps:" +log "docker ps after:" $docker_cmd ps log "Script finishing"