dotnet-installer/build/Publish.targets
William Li ad56d3759e fix missing windows package
Put back the dependency of package. Duplicate a publish step with package and use that one in all linux distro specific
2017-09-15 15:28:57 -07:00

82 lines
No EOL
3.5 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=" '$(IslinuxPortable)' != 'true' "/>
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
Condition=" '$(IsLinuxDistroSpecific)' != 'true' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(IsLinuxDistroSpecific)' != 'true'"/>
</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>