From 5eae3da213f86f9cb454e8f7a1cf77c2f5cdb9f4 Mon Sep 17 00:00:00 2001 From: PointStar Date: Tue, 26 May 2026 15:31:14 +0300 Subject: [PATCH] =?UTF-8?q?publish:=201.2.12=20=E2=80=94=20harden=20VSTO?= =?UTF-8?q?=20rename=20+=20reissue=20broken=20v1.2.11=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.2.11 shipped a broken publish.tar.gz: the Rename-Item that turns `MarcusLaw.OutlookAddin.vsto` into the canonical `OutlookAddin.vsto` failed silently (script ran with $ErrorActionPreference = 'Continue'), so the docker image had no OutlookAddin.vsto at the expected path and the CDN 404'd on the auto-update URL. Gitea Generic packages are immutable, so 1.2.11 cannot be republished. Restrict the .vsto lookup to publish/ root (Get-ChildItem -File, no -Recurse) so the inner versioned manifest under Application Files is never picked, switch the rename to -ErrorAction Stop, and assert that publish/OutlookAddin.vsto exists before continuing. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/build.yml | 20 +++++++++++++------- src/OutlookAddin/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0f69b97..d1eea3a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -258,15 +258,21 @@ jobs: & msbuild @msbuildArgs if ($LASTEXITCODE -ne 0) { throw "msbuild /t:Publish failed with $LASTEXITCODE" } - # Sanity check: did the VSTO publish target produce a .vsto file? - $vsto = Get-ChildItem -Recurse -Filter '*.vsto' -Path publish | Select-Object -First 1 - if (-not $vsto) { throw "msbuild /t:Publish completed but no .vsto file found under publish/" } + # Sanity check + rename to canonical OutlookAddin.vsto so the URL + # matches PROVIDER_URL (hardcoded to .../OutlookAddin.vsto). Restrict + # to publish/ root -- there's a second .vsto inside Application Files + # that must keep its versioned name. Verify the renamed file exists + # before continuing; v1.2.11 shipped broken because a silent failure + # here left no OutlookAddin.vsto in the tar and 404'd the CDN. + $vsto = Get-ChildItem -File -Filter '*.vsto' -Path publish | Select-Object -First 1 + if (-not $vsto) { throw "msbuild /t:Publish completed but no .vsto file found at publish/ root" } Write-Host " produced $($vsto.FullName)" - - # Rename to canonical OutlookAddin.vsto so the ClickOnce manifest - # URL matches PROVIDER_URL (which is hardcoded to .../OutlookAddin.vsto). if ($vsto.Name -ne 'OutlookAddin.vsto') { - Rename-Item -LiteralPath $vsto.FullName -NewName 'OutlookAddin.vsto' + Rename-Item -LiteralPath $vsto.FullName -NewName 'OutlookAddin.vsto' -ErrorAction Stop + Write-Host " renamed -> OutlookAddin.vsto" + } + if (-not (Test-Path 'publish/OutlookAddin.vsto')) { + throw "post-rename: publish/OutlookAddin.vsto does not exist" } Write-Host "=== STEP F: stage protocol handler ===" diff --git a/src/OutlookAddin/Properties/AssemblyInfo.cs b/src/OutlookAddin/Properties/AssemblyInfo.cs index 6346bc1..a8df476 100644 --- a/src/OutlookAddin/Properties/AssemblyInfo.cs +++ b/src/OutlookAddin/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System.Security; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.11.0")] -[assembly: AssemblyFileVersion("1.2.11.0")] +[assembly: AssemblyVersion("1.2.12.0")] +[assembly: AssemblyFileVersion("1.2.12.0")]