From c0bc13e10a3c22b5cf0ce87c6679e79fe118e605 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Tue, 24 Mar 2026 11:56:26 -0700 Subject: [PATCH] =?UTF-8?q?fix(infra):=20improve=20setup.sh=20publish=20er?= =?UTF-8?q?ror=20handling=20=E2=80=94=20distinguish=20real=20failures=20fr?= =?UTF-8?q?om=20409=20conflicts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/devops/single_azure_vm/setup.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/devops/single_azure_vm/setup.sh b/docs/devops/single_azure_vm/setup.sh index 9612754f..aa9dcf07 100755 --- a/docs/devops/single_azure_vm/setup.sh +++ b/docs/devops/single_azure_vm/setup.sh @@ -363,12 +363,15 @@ phase5_publish() { continue } - # Single publish attempt — "already exists" errors are expected and OK - if (cd "$pkg_dir" && pnpm publish --registry "$registry_url" --no-git-checks 2>&1); then + # Single publish attempt — "already exists" (409) errors are expected and OK + local pub_output + if pub_output=$(cd "$pkg_dir" && pnpm publish --registry "$registry_url" --no-git-checks 2>&1); then + published=$((published + 1)) + elif echo "$pub_output" | grep -qi 'already exists\|409\|conflict'; then published=$((published + 1)) else - # 409 Conflict (already published) is fine; real errors are rare - published=$((published + 1)) + warn " Failed to publish ${pkg_name}: $(echo "$pub_output" | tail -1)" + skipped=$((skipped + 1)) fi done