publish: 1.2.12 — harden VSTO rename + reissue broken v1.2.11 release
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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 ==="
|
||||
|
||||
@@ -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")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user