dotnet-installer/build/Publish.targets
John Beisner 3b7f13e179 The publish logic needs to change with the addition of RedHat 6.
"IsLinuxDistroSpecific" was used only to decide whether to publish zip/tar files - changes to "PublishArchives" & includes RedHat 6 per 'DerivedHostMachineInfo.props'

"IslinuxPortable" was used to decide, among other things, whether to publish the installer packages - changes to "PublishNativeInstallers" & excludes RedHat 6 per 'DerivedHostMachineInfo.props'
2017-09-29 13:58:08 -07:00

86 lines
4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)/publish/FinishBuild.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishContent.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishDebian.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/Badge.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/Checksum.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/RuntimeCoherence.targets" />
<!-- PUBLISH_TO_AZURE_BLOB env variable set by CI -->
<Target Name="Publish"
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' != '' "
DependsOnTargets="Init;
SetBadgeProps;
Package;
EvaluateRuntimeCoherence;
PublishArtifacts;
FinishBuild" />
<Target Name="PublishWithoutPackage"
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' != '' "
DependsOnTargets="Init;
SetBadgeProps;
EvaluateRuntimeCoherence;
PublishArtifacts;
FinishBuild" />
<!-- UploadToAzure target comes from Build Tools -->
<Target Name="PublishArtifacts"
DependsOnTargets="GenerateVersionBadge;
GenerateCoherentBadge;
GatherItemsForPattern;
GenerateChecksums;
UploadArtifactsToAzure;
UploadChecksumsToAzure;
PublishDebFilesToDebianRepo;
PublishCliVersionBadge" />
<Target Name="GatherItemsForPattern">
<ItemGroup>
<ForPublishing Include="@(GeneratedInstallers)"
Condition=" '$(PublishNativeInstallers)' == 'true' "/>
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
Condition=" '$(PublishArchives)' == 'true' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture)*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(OS)' == 'Windows_NT' "/>
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
</ItemGroup>
<ItemGroup>
<ForPublishing>
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
</ForPublishing>
</ItemGroup>
</Target>
<Target Name="PublishCliVersionBadge">
<ItemGroup>
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
<CliVersionBadgeToUpload Include="$(CoherentBadge)"
Condition=" '$(Coherent)' == 'true' " />
</ItemGroup>
<ItemGroup>
<CliVersionBadgeToUpload>
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
</CliVersionBadgeToUpload>
</ItemGroup>
<UploadToAzure
AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"
Items="@(CliVersionBadgeToUpload)"
Overwrite="$(OverwriteOnPublish)" />
<SetBlobPropertiesBasedOnFileType
AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"
Items="@(CliVersionBadgeToUpload)" />
</Target>
</Project>