Skip to content

Commit d9c2f74

Browse files
wtgodbedougbu
andauthored
Attempt to auto-publish vs.redist packages to orchestrated feed (#20211)
* Attempt to auto-publish vs.redist packages to orchestrated feed * Use non-stable packageVersion for vs.redist * Fix typo * Update build/Publish.targets - should trigger a build that's more likely to succeed * Print what we're trying to publish * More debug prints * Set RedistPackageId in publishing.targets * Reference variable correctly * Remove unnecessary messages * Respond to feedback Co-authored-by: Doug Bunting <[email protected]>
1 parent 23493a9 commit d9c2f74

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

build/Publish.targets

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
<InstallerAliasBaseFileName>aspnetcore-runtime-latest</InstallerAliasBaseFileName>
6767
<IntermediateInstallerBaseFileName>aspnetcore-runtime-internal-$(PackageVersion)</IntermediateInstallerBaseFileName>
6868
<WindowsHostingBundleInstallerFileName>dotnet-hosting-$(PackageVersion)-win.exe</WindowsHostingBundleInstallerFileName>
69+
<!-- This matches the property set in SharedFramework.wixproj -->
70+
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
6971
</PropertyGroup>
7072

7173
<ItemGroup>
@@ -174,6 +176,10 @@
174176
<PackageToPublish Include="%(_SymbolsPackageArtifactInfo.ArtifactPath)" Category="symbols" IsSymbolsPackage="true" />
175177
</ItemGroup>
176178

179+
<ItemGroup>
180+
<RedistPackageToPublish Include="$(DependencyAssetsDir)$(SharedFrameworkRedistPackageId)*" />
181+
</ItemGroup>
182+
177183
<ItemGroup>
178184
<_MissingArtifactFile Include="@(FilesToPublish)" Condition="!Exists(%(FilesToPublish.Identity))" />
179185
<_MissingArtifactFile Include="@(NpmPackageToPublish)" Condition="!Exists(%(NpmPackageToPublish.Identity))" />
@@ -276,6 +282,10 @@
276282
ManifestArtifactData="NonShipping=true"
277283
Condition="'%(PackageToPublish.Category)' != 'ship'" />
278284

285+
<PackageToPublishToTransport
286+
Include="@(RedistPackageToPublish)"
287+
ManifestArtifactData="NonShipping=true" />
288+
279289
<FilesToPublishToTransport Include="@(NpmPackageToPublish)"
280290
RelativeBlobPath="$(BlobFileRelativePathBase)%(NpmPackageToPublish.RelativeBlobPath)"
281291
ManifestArtifactData="%(NpmPackageToPublish.ManifestArtifactData)" />
@@ -287,7 +297,6 @@
287297
Condition=" '%(FilesToPublish.IsDuplicateUpload)' != 'true' " />
288298
</ItemGroup>
289299

290-
291300
<PushToBlobFeed ExpectedFeedUrl="$(PublishBlobFeedUrl)"
292301
AccountKey="$(PublishBlobFeedKey)"
293302
ItemsToPush="@(PackageToPublishToTransport)"

src/Installers/Windows/GenerateNugetPackageWithMsi.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ param(
1111
[Parameter(Mandatory=$true)][string]$PackageVersion,
1212
[Parameter(Mandatory=$true)][string]$RepoRoot,
1313
[Parameter(Mandatory=$true)][string]$MajorVersion,
14-
[Parameter(Mandatory=$true)][string]$MinorVersion
14+
[Parameter(Mandatory=$true)][string]$MinorVersion,
15+
[Parameter(Mandatory=$true)][string]$PackageId
1516
)
1617

1718
$NuGetDir = Join-Path $RepoRoot "obj\Tools\nuget\$Name\$Architecture"
@@ -27,5 +28,5 @@ if (-not (Test-Path $NuGetExe)) {
2728
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
2829
}
2930

30-
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;
31+
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;ID=$PackageId`;
3132
Exit $LastExitCode

src/Installers/Windows/SharedFramework/SharedFramework.wixproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
2020
<ToolsetInstallerNuspecFile>$(RepositoryRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec</ToolsetInstallerNuspecFile>
2121
<InstallersOutputPath>$(RepositoryRoot)artifacts/bin/$(Configuration)/installers/</InstallersOutputPath>
22+
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
23+
<!-- Use non-stable versioning for this package, but keep the stable version in OutputName above -->
24+
<PackageVersion>$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
2225
</PropertyGroup>
2326

2427
<ItemGroup>
@@ -64,7 +67,8 @@
6467
'$(PackageVersion)' ^
6568
'$(RepositoryRoot)' ^
6669
'$(AspNetCoreMajorVersion)' ^
67-
'$(AspNetCoreMinorVersion)'" />
70+
'$(AspNetCoreMinorVersion)' ^
71+
'$(SharedFrameworkRedistPackageId)'" />
6872
</Target>
6973

7074
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

src/Installers/Windows/SharedFramework/SharedFrameworkPackage.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
4-
<id>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</id>
4+
<id>$ID$.$ARCH$.$MAJOR$.$MINOR$</id>
55
<version>1.0.0</version>
6-
<title>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</title>
6+
<title>$ID$.$ARCH$.$MAJOR$.$MINOR$</title>
77
<authors>Microsoft</authors>
88
<owners>Microsoft</owners>
99
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>

0 commit comments

Comments
 (0)