From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Thu, 27 Jun 2024 18:15:04 +0000 (-0700) Subject: Return to using local paths for RS publishing (#4764) X-Git-Tag: accepted/tizen/unified/20241231.014852~39^2^2~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e009bfe09b92ef8d2064c4103f3cac85915b3ceb;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Return to using local paths for RS publishing (#4764) --- diff --git a/eng/release/Scripts/FixupManifestToLocal.ps1 b/eng/release/Scripts/FixupManifestToLocal.ps1 index c5c07a44c..544ecb102 100644 --- a/eng/release/Scripts/FixupManifestToLocal.ps1 +++ b/eng/release/Scripts/FixupManifestToLocal.ps1 @@ -1,7 +1,7 @@ param( [Parameter(Mandatory=$true)][string] $ManifestPath, [Parameter(Mandatory=$true)][string] $StagingPath, - [Parameter(Mandatory=$true)][string] $DelegationSasToken, + [Parameter(Mandatory=$false)][string] $DelegationSasToken, [switch] $help, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) @@ -55,9 +55,31 @@ foreach ($nugetPack in $manifestJson.NugetAssets) Add-Member -InputObject $nugetPack -MemberType NoteProperty -Name LocalPath -Value $packagePath } +$toolHashToLocalPath = @{} + +foreach ($tool in $manifestJson.ToolBundleAssets) +{ + $toolPath = Join-Path $StagingPath $tool.PublishRelativePath + if (!(Test-Path $toolPath)) + { + Write-Error "Error: unable to find package at '$toolPath'." + continue + } + Add-Member -InputObject $tool -MemberType NoteProperty -Name LocalPath -Value $toolPath + $toolHashToLocalPath.Add($tool.Sha512, $toolPath) +} + foreach ($asset in $manifestJson.PublishInstructions) { - $asset.FilePath += "?" + $DelegationSasToken + $remotePath = $asset.FilePath + + if ($DelegationSasToken -ne "") + { + $remotePath = "$remotePath?$DelegationSasToken" + } + + Add-Member -InputObject $asset -MemberType NoteProperty -Name RemotePath -Value $remotePath + $asset.FilePath = $toolHashToLocalPath[$asset.Sha512] } Copy-Item $ManifestPath "$ManifestPath.bak"