fix(ci): tolerate existing legacy FTP directories
deploy-preland / deploy barbariskatest (push) Failing after 1m49s
deploy-preland / deploy zoomstage.online (push) Skipped
deploy-preland / deploy zoompixel.online (push) Successful in 35s
deploy-preland / deploy zoompixel.ru (push) Successful in 52s

This commit is contained in:
Panfilov Konstantin committed 2026-10-18 00:57:20 +03:00
1 parent 78b24c91f8
commit 56456bb0cb
1 file changed
+4 -1
+4 -1
View File
@@ -111,7 +111,10 @@ jobs:
remote_dir=${f%/*} remote_dir=${f%/*}
[ "$remote_dir" = "$f" ] && remote_dir='.' [ "$remote_dir" = "$f" ] && remote_dir='.'
if [ "$remote_dir" != '.' ]; then if [ "$remote_dir" != '.' ]; then
printf 'mkdir -p %s%s\n' "${dir:+$dir/}" "$remote_dir" >> "$script" # Legacy-сервер возвращает 550 и для уже существующего каталога.
# Ошибку mkdir гасим, но put по-прежнему завершит выпуск ошибкой,
# если каталог действительно нельзя использовать.
printf 'mkdir -p %s%s || echo\n' "${dir:+$dir/}" "$remote_dir" >> "$script"
fi fi
printf 'put -O %s%s %s\n' \ printf 'put -O %s%s %s\n' \
"${dir:+$dir/}" "$remote_dir" "$f" >> "$script" "${dir:+$dir/}" "$remote_dir" "$f" >> "$script"