Skip to content

Commit

Permalink
Add before and after output for docker and git
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Dec 21, 2024
1 parent 898437e commit d8f968e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repo-converter/pull-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"

0 comments on commit d8f968e

Please sign in to comment.