Skip to content

Commit faa4caa

Browse files
Remove PublishedPath from release manifest (#6342)
Co-authored-by: Justin Anderson <[email protected]>
1 parent 00bd734 commit faa4caa

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

eng/release/DiagnosticsReleaseTool/DiagnosticsManifestGenerator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ private void WriteFiles(Utf8JsonWriter writer, IEnumerable<FileReleaseData> file
6969
{
7070
writer.WriteStartObject();
7171
writer.WriteString("PublishRelativePath", fileToRelease.FileMap.RelativeOutputPath);
72-
writer.WriteString("PublishedPath", fileToRelease.PublishUri);
7372
writer.WriteString("Sha512", fileToRelease.FileMetadata.Sha512);
7473
writer.WriteEndObject();
7574
}

eng/release/DiagnosticsReleaseTool/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ This can be shared by anyone who needs to release files to CDN and generate rele
5454
"ToolName": "dotnet-counters",
5555
"Rid": "linux-arm",
5656
"PublishRelativePath": "ToolBundleAssets\\linux-arm\\dotnet-counters",
57-
"PublishedPath": "\\\\random\\share\\68656-20201030-04\\ToolBundleAssets\\linux-arm\\dotnet-counters"
5857
}
5958
],
6059
"NugetAssets": [
6160
{
6261
"PublishRelativePath": "NugetAssets\\dotnet-counters.5.0.152202.nupkg",
63-
"PublishedPath": "\\\\random\\share\\68656-20201030-04\\ToolBundleAssets\\linux-arm\\dotnet-counters"
6462
}
6563
]
6664
}

eng/release/Scripts/PublishToNuget.ps1

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,29 @@ $failedToPublish = 0
5050
foreach ($nugetPack in $manifestJson.NugetAssets)
5151
{
5252
$packagePath = Join-Path $StagingPath $nugetPack.PublishRelativePath
53-
try
53+
if (!(Test-Path $packagePath))
5454
{
55-
Write-Host "Downloading: $nugetPack."
56-
$progressPreference = 'silentlyContinue'
57-
Invoke-WebRequest -Uri $nugetPack.PublishedPath -OutFile (New-Item -Path $packagePath -Force)
58-
$progressPreference = 'Continue'
59-
60-
Write-Host "Publishing $packagePath."
61-
& "$PSScriptRoot/../../../dotnet.cmd" nuget push $packagePath --source $FeedEndpoint --api-key $FeedPat
62-
if ($LastExitCode -ne 0)
55+
Write-Error "Error: Expected package at $packagePath"
56+
$failedToPublish++
57+
}
58+
else
59+
{
60+
try
61+
{
62+
Write-Host "Publishing $packagePath."
63+
& "$PSScriptRoot/../../../dotnet.cmd" nuget push $packagePath --source $FeedEndpoint --api-key $FeedPat
64+
if ($LastExitCode -ne 0)
65+
{
66+
Write-Error "Error: unable to publish $($nugetPack.PublishRelativePath)."
67+
$failedToPublish++
68+
}
69+
}
70+
catch
6371
{
6472
Write-Error "Error: unable to publish $($nugetPack.PublishRelativePath)."
6573
$failedToPublish++
6674
}
6775
}
68-
catch
69-
{
70-
Write-Error "Error: unable to publish $($nugetPack.PublishRelativePath)."
71-
$failedToPublish++
72-
}
7376
}
7477

7578
if ($failedToPublish -ne 0)

0 commit comments

Comments
 (0)