dotnet-installer/build/Publish.targets

80 lines
3.7 KiB
Text
Raw Normal View History

<?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" />
2017-02-23 17:26:14 +00:00
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishDebian.targets" />
2017-02-14 23:42:13 +00:00
<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)' != '' "
2016-07-15 20:44:11 +00:00
DependsOnTargets="Init;
Package;
2017-07-06 18:11:07 +00:00
EvaluateRuntimeCoherence;
PublishArtifacts;
2016-07-15 20:44:11 +00:00
FinishBuild" />
<!-- UploadToAzure target comes from Build Tools -->
<Target Name="PublishArtifacts"
2017-06-30 19:17:20 +00:00
DependsOnTargets="GenerateVersionBadge;
GenerateCoherentBadge;
GatherItemsForPattern;
GenerateChecksums;
UploadArtifactsToAzure;
UploadChecksumsToAzure;
PublishDebFilesToDebianRepo;
2017-07-03 21:34:04 +00:00
PublishCliVersionBadge" />
<Target Name="GatherItemsForPattern"
DependsOnTargets="GenerateSdkNupkg;
GenerateSdkMSBuildExtensionsNupkg" >
<ItemGroup>
<ForPublishing Include="@(GeneratedInstallers)"
Condition=" '$(IslinuxPortable)' != 'true' "/>
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
Condition=" '$(IsLinuxDistroSpecific)' != 'true' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(IsLinuxDistroSpecific)' != 'true'"/>
<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)" />
2017-07-03 21:34:04 +00:00
<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)" />
2016-07-15 20:44:11 +00:00
<SetBlobPropertiesBasedOnFileType
AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"
Items="@(CliVersionBadgeToUpload)" />
</Target>
</Project>