diff --git a/scripts/deploy b/scripts/deploy index 37d0b70d4..0429f8155 100755 --- a/scripts/deploy +++ b/scripts/deploy @@ -161,17 +161,36 @@ deployOneHost() { fi } +failedDeploys=() +deployHosts() { + local hosts=("$@") + for v in "${variants[@]}"; do + for h in "${hosts[@]}"; do + deployOneHost "$h" "$v" || \ + failedDeploys+=("$h$v") + done + done +} parseArgs "$@" -failedDeploys=() -for v in "${variants[@]}"; do - for h in "${hosts[@]}"; do - deployOneHost "$h" "$v" || \ - failedDeploys+=("$h$v") - done +# i care e.g. that full moby is deployed before crappy: +earlyHosts=() +lateHosts=() +for host in "${hosts[@]}"; do + case $host in + (crappy) + lateHosts+=("$host") + ;; + (*) + earlyHosts+=("$host") + ;; + esac done +deployHosts "${earlyHosts[@]}" +deployHosts "${lateHosts[@]}" + if [ "${#failedDeploys[@]}" -ne 0 ]; then echo "FAILED DEPLOYMENT:" for d in "${failedDeploys[@]}"; do