Skip to content

Commit bb2250d

Browse files
authored
Reformat pull start log output (#49)
Reformat pull start script log output
1 parent 5cb75e2 commit bb2250d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

repo-converter/pull-start.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ log_file="$repo_converter_dir/pull-start.log"
1414
git_cmd="git -C $repo_converter_dir"
1515
docker_compose_file_path="$repo_converter_dir/docker-compose.yaml"
1616
docker_cmd="docker compose -f $docker_compose_file_path"
17+
docker_up_sleep_seconds=10
1718

1819
# Log to both stdout and log file
1920
exec > >(tee -a "$log_file") 2>&1
@@ -34,7 +35,15 @@ command="\
3435
$docker_cmd up -d --remove-orphans \
3536
"
3637

37-
log "Running command in subshell: $command"
38+
log "Running command in subshell:"
39+
echo "$command" | awk 'BEGIN{FS="&&"; OFS="&& \n"} {$1=$1} 1'
40+
3841
bash -c "$command" >> "$log_file" 2>&1
3942

43+
log "Sleeping $docker_up_sleep_seconds seconds to give Docker containers time to start and stabilize"
44+
sleep $docker_up_sleep_seconds
45+
46+
log "docker ps:"
47+
$docker_cmd ps
48+
4049
log "Script finishing"

0 commit comments

Comments
 (0)