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 <6431421+dougbu@users.noreply.github.com>
This commit is contained in:
William Godbe 2020-04-01 14:45:39 -07:00 committed by GitHub
parent 23493a9962
commit d9c2f744fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -66,6 +66,8 @@
<InstallerAliasBaseFileName>aspnetcore-runtime-latest</InstallerAliasBaseFileName>
<IntermediateInstallerBaseFileName>aspnetcore-runtime-internal-$(PackageVersion)</IntermediateInstallerBaseFileName>
<WindowsHostingBundleInstallerFileName>dotnet-hosting-$(PackageVersion)-win.exe</WindowsHostingBundleInstallerFileName>
<!-- This matches the property set in SharedFramework.wixproj -->
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
</PropertyGroup>
<ItemGroup>
@ -174,6 +176,10 @@
<PackageToPublish Include="%(_SymbolsPackageArtifactInfo.ArtifactPath)" Category="symbols" IsSymbolsPackage="true" />
</ItemGroup>
<ItemGroup>
<RedistPackageToPublish Include="$(DependencyAssetsDir)$(SharedFrameworkRedistPackageId)*" />
</ItemGroup>
<ItemGroup>
<_MissingArtifactFile Include="@(FilesToPublish)" Condition="!Exists(%(FilesToPublish.Identity))" />
<_MissingArtifactFile Include="@(NpmPackageToPublish)" Condition="!Exists(%(NpmPackageToPublish.Identity))" />
@ -276,6 +282,10 @@
ManifestArtifactData="NonShipping=true"
Condition="'%(PackageToPublish.Category)' != 'ship'" />
<PackageToPublishToTransport
Include="@(RedistPackageToPublish)"
ManifestArtifactData="NonShipping=true" />
<FilesToPublishToTransport Include="@(NpmPackageToPublish)"
RelativeBlobPath="$(BlobFileRelativePathBase)%(NpmPackageToPublish.RelativeBlobPath)"
ManifestArtifactData="%(NpmPackageToPublish.ManifestArtifactData)" />
@ -287,7 +297,6 @@
Condition=" '%(FilesToPublish.IsDuplicateUpload)' != 'true' " />
</ItemGroup>
<PushToBlobFeed ExpectedFeedUrl="$(PublishBlobFeedUrl)"
AccountKey="$(PublishBlobFeedKey)"
ItemsToPush="@(PackageToPublishToTransport)"

View File

@ -11,7 +11,8 @@ param(
[Parameter(Mandatory=$true)][string]$PackageVersion,
[Parameter(Mandatory=$true)][string]$RepoRoot,
[Parameter(Mandatory=$true)][string]$MajorVersion,
[Parameter(Mandatory=$true)][string]$MinorVersion
[Parameter(Mandatory=$true)][string]$MinorVersion,
[Parameter(Mandatory=$true)][string]$PackageId
)
$NuGetDir = Join-Path $RepoRoot "obj\Tools\nuget\$Name\$Architecture"
@ -27,5 +28,5 @@ if (-not (Test-Path $NuGetExe)) {
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
}
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;
& $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`;
Exit $LastExitCode

View File

@ -19,6 +19,9 @@
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
<ToolsetInstallerNuspecFile>$(RepositoryRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec</ToolsetInstallerNuspecFile>
<InstallersOutputPath>$(RepositoryRoot)artifacts/bin/$(Configuration)/installers/</InstallersOutputPath>
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
<!-- Use non-stable versioning for this package, but keep the stable version in OutputName above -->
<PackageVersion>$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
</PropertyGroup>
<ItemGroup>
@ -64,7 +67,8 @@
'$(PackageVersion)' ^
'$(RepositoryRoot)' ^
'$(AspNetCoreMajorVersion)' ^
'$(AspNetCoreMinorVersion)'" />
'$(AspNetCoreMinorVersion)' ^
'$(SharedFrameworkRedistPackageId)'" />
</Target>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</id>
<id>$ID$.$ARCH$.$MAJOR$.$MINOR$</id>
<version>1.0.0</version>
<title>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</title>
<title>$ID$.$ARCH$.$MAJOR$.$MINOR$</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>