2016-08-09 13:28:23 +00:00
|
|
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<OverwriteOnPublish Condition="'$(OverwriteOnPublish)' == ''">false</OverwriteOnPublish>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- gathers the items to be published -->
|
|
|
|
<Target Name="GatherItemsForPattern">
|
|
|
|
<Error Condition="'$(PublishPattern)' == ''" Text="Please specify a value for PublishPattern using standard msbuild 'include' syntax." />
|
|
|
|
<ItemGroup>
|
|
|
|
<ForPublishing Include="$(PublishPattern)" />
|
|
|
|
</ItemGroup>
|
|
|
|
<!-- add relative blob path metadata -->
|
|
|
|
<ItemGroup>
|
|
|
|
<ForPublishing>
|
2016-10-12 19:25:06 +00:00
|
|
|
<RelativeBlobPath>$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
2016-08-09 13:28:23 +00:00
|
|
|
</ForPublishing>
|
|
|
|
</ItemGroup>
|
|
|
|
<Error Condition="'@(ForPublishing)' == ''" Text="No items were found matching pattern '$(PublishPattern)'." />
|
|
|
|
</Target>
|
|
|
|
|
2016-10-12 19:25:06 +00:00
|
|
|
<!-- publishes artifacts to blob storage in Azure -->
|
|
|
|
<Target Name="UploadArtifactsToAzure" DependsOnTargets="GatherItemsForPattern">
|
|
|
|
<Error Condition="'$(ArtifactContainerName)' == ''" Text="Missing property ArtifactContainerName." />
|
|
|
|
<Error Condition="'$(ArtifactCloudDropAccountName)' == ''" Text="Missing property ArtifactCloudDropAccountName." />
|
|
|
|
<Error Condition="'$(ArtifactCloudDropAccessToken)' == ''" Text="Missing property ArtifactCloudDropAccessToken." />
|
2016-08-09 13:28:23 +00:00
|
|
|
<!-- create the container if it doesn't exist -->
|
|
|
|
<CreateAzureContainer
|
2016-10-12 19:25:06 +00:00
|
|
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
|
|
|
AccountName="$(ArtifactCloudDropAccountName)"
|
|
|
|
ContainerName="$(ArtifactContainerName)" />
|
2016-08-09 13:28:23 +00:00
|
|
|
<!-- now upload the items -->
|
|
|
|
<UploadToAzure
|
2016-10-12 19:25:06 +00:00
|
|
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
|
|
|
AccountName="$(ArtifactCloudDropAccountName)"
|
|
|
|
ContainerName="$(ArtifactContainerName)"
|
2016-08-09 13:28:23 +00:00
|
|
|
Items="@(ForPublishing)"
|
|
|
|
Overwrite="$(OverwriteOnPublish)" />
|
|
|
|
</Target>
|
|
|
|
|
2016-10-12 19:25:06 +00:00
|
|
|
<!-- publishes checksums for the artifacts to blob storage in Azure -->
|
|
|
|
<Target Name="UploadChecksumsToAzure" DependsOnTargets="GenerateChecksums">
|
|
|
|
<Error Condition="'$(ChecksumContainerName)' == ''" Text="Missing property ChecksumContainerName." />
|
|
|
|
<Error Condition="'$(ChecksumCloudDropAccountName)' == ''" Text="Missing property ChecksumCloudDropAccountName." />
|
|
|
|
<Error Condition="'$(ChecksumCloudDropAccessToken)' == ''" Text="Missing property ChecksumCloudDropAccessToken." />
|
|
|
|
<!-- create the container if it doesn't exist -->
|
|
|
|
<CreateAzureContainer
|
|
|
|
AccountKey="$(ChecksumCloudDropAccessToken)"
|
|
|
|
AccountName="$(ChecksumCloudDropAccountName)"
|
|
|
|
ContainerName="$(ChecksumContainerName)" />
|
|
|
|
<!-- now upload the items -->
|
|
|
|
<UploadToAzure
|
|
|
|
AccountKey="$(ChecksumCloudDropAccessToken)"
|
|
|
|
AccountName="$(ChecksumCloudDropAccountName)"
|
|
|
|
ContainerName="$(ChecksumContainerName)"
|
|
|
|
Items="@(ArtifactsForGeneratingChecksums->'%(DestinationPath)')"
|
|
|
|
Overwrite="$(OverwriteOnPublish)" />
|
|
|
|
</Target>
|
|
|
|
|
2016-08-09 13:28:23 +00:00
|
|
|
</Project>
|