JIT: Fix bug in finally cloning caused by unsound callfinally reordering
[platform/upstream/coreclr.git] / src / publish.proj
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
4
5   <Import Project="$(PackagesDir)/$(FeedTasksPackage.ToLower())/$(FeedTasksPackageVersion)/build/$(FeedTasksPackage).targets" />
6   <Import Project="$(PackagesDir)/$(PublishSymbolsPackage.ToLower())/$(PublishSymbolsPackageVersion)/build/PublishSymbols.targets" />
7
8   <UsingTask TaskName="CreateAzureContainer" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>
9   <UsingTask TaskName="UploadToAzure" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>
10
11   <PropertyGroup>
12     <PackagesPatternDir Condition="'$(PackagesPatternDir)' == ''">$(PackagesBinDir)</PackagesPatternDir>
13     <PackagesPattern Condition="'$(PackagesPattern)' == ''">$(PackagesPatternDir)pkg\*.nupkg</PackagesPattern>
14     <TestNativeBinariesPattern Condition="'$(TestNativeBinariesPattern)' == ''">$(OutputPath)\bin\**</TestNativeBinariesPattern>
15     <SymbolsPackagesPattern Condition="'$(SymbolPackagesPattern)' == ''">$(PackagesPatternDir)symbolpkg\*.nupkg</SymbolsPackagesPattern>
16     <PublishFlatContainer Condition="'$(PublishFlatContainer)' == ''">true</PublishFlatContainer>
17     <RelativePathWithSlash>$(RelativePath)</RelativePathWithSlash>
18     <RelativePathWithSlash Condition="'$(RelativePathWithSlash)' != '' and !HasTrailingSlash('$(RelativePathWithSlash)')">$(RelativePathWithSlash)/</RelativePathWithSlash>
19   </PropertyGroup>
20
21   <PropertyGroup>
22     <ContainerName>$(ContainerName.Replace(".","-"))</ContainerName>
23     <AccountName>$(CloudDropAccountName)</AccountName>
24     <AccountKey>$(CloudDropAccessToken)</AccountKey>
25   </PropertyGroup>
26
27   <Target Name="PublishPackages" Condition="'$(__PublishPackages)' == 'true' and ('$(OfficialPublish)' != 'true' or '$(__BuildType)' == 'Release')">
28     <PropertyGroup>
29       <ExpectedFeedUrl Condition="'$(ExpectedFeedUrl)' == ''">https://$(AccountName).blob.core.windows.net/$(ContainerName)/$(RelativePathWithSlash)index.json</ExpectedFeedUrl>
30     </PropertyGroup>
31     <ItemGroup>
32       <ItemsToPush Remove="*.nupkg" />
33       <ItemsToPush Include="$(PackagesPattern)" Exclude="$(SymbolsPackagesPattern)">
34         <ManifestArtifactData>NonShipping=true</ManifestArtifactData>
35       </ItemsToPush>
36       <ItemsToPush>
37         <RelativeBlobPath>$(RelativePathWithSlash)$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
38       </ItemsToPush>
39     </ItemGroup>
40
41     <PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
42                     ExpectedFeedUrl="$(ExpectedFeedUrl)"
43                     AccountKey="$(AccountKey)"
44                     ItemsToPush="@(ItemsToPush)"
45                     Overwrite="$(OverwriteOnPublish)"
46                     ManifestName="$(GitHubRepositoryName)"
47                     ManifestBuildId="$(ManifestBuildId)"
48                     ManifestBranch="$(ManifestBranch)"
49                     ManifestCommit="$(ManifestCommit)" />
50
51     <!-- create the container if it doesn't exist -->
52     <CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
53                           AccountKey="$(AccountKey)"
54                           AccountName="$(AccountName)"
55                           ContainerName="$(ContainerName)"
56                           IsPublic="false" />
57
58     <!-- now upload the items -->
59     <UploadToAzure  Condition="'$(PublishFlatContainer)' == 'true'"
60                     AccountKey="$(AccountKey)"
61                     AccountName="$(AccountName)"
62                     ContainerName="$(ContainerName)"
63                     Items="@(ItemsToPush)"
64                     Overwrite="$(OverwriteOnPublish)" />
65   </Target>
66
67   <Target Name="PublishSymbolPackages" Condition="'$(__PublishSymbols)' == 'true' and ('$(OfficialPublish)' != 'true' or '$(__BuildType)' == 'Release')">
68     <PropertyGroup>
69       <ExpectedFeedUrl Condition="'$(ExpectedFeedUrl)' == ''">https://$(AccountName).blob.core.windows.net/$(ContainerName)/$(RelativePathWithSlash)index.json</ExpectedFeedUrl>
70     </PropertyGroup>
71     <ItemGroup>
72       <ItemsToPush Remove="*.nupkg" />
73       <ItemsToPush Include="$(SymbolsPackagesPattern)"/>
74       <ItemsToPush>
75         <RelativeBlobPath>$(RelativePathWithSlash)$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
76       </ItemsToPush>
77     </ItemGroup>
78
79     <PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
80                     ExpectedFeedUrl="$(ExpectedFeedUrl)"
81                     AccountKey="$(AccountKey)"
82                     ItemsToPush="@(ItemsToPush)"
83                     Overwrite="$(OverwriteOnPublish)"
84                     ManifestName="$(GitHubRepositoryName)"
85                     ManifestBuildId="$(ManifestBuildId)"
86                     ManifestBranch="$(ManifestBranch)"
87                     ManifestCommit="$(ManifestCommit)" />
88
89     <!-- create the container if it doesn't exist -->
90     <CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
91                           AccountKey="$(AccountKey)"
92                           AccountName="$(AccountName)"
93                           ContainerName="$(ContainerName)"
94                           IsPublic="false" />
95
96     <!-- now upload the items -->
97     <UploadToAzure  Condition="'$(PublishFlatContainer)' == 'true'"
98                     AccountKey="$(AccountKey)"
99                     AccountName="$(AccountName)"
100                     ContainerName="$(ContainerName)"
101                     Items="@(ItemsToPush)"
102                     Overwrite="$(OverwriteOnPublish)" />
103   </Target>
104
105   <Target Name="PublishTestNativeBinaries" Condition="'$(PublishTestNativeBins)' == 'true' and '$(OfficialPublish)' != 'true'">
106     <PropertyGroup>
107       <RelativePath Condition="'$(RelativePath)' == ''">$(__BuildType)/TestNativeBins</RelativePath>
108       <ExpectedFeedUrl Condition="'$(ExpectedFeedUrl)' == ''">https://$(AccountName).blob.core.windows.net/$(ContainerName)/$(RelativePath)/index.json</ExpectedFeedUrl>
109     </PropertyGroup>
110     <ItemGroup>
111       <ItemsToPush Remove="*.nupkg" />
112       <ItemsToPush Include="$(TestNativeBinariesPattern)" />
113       <ItemsToPush>
114         <RelativeBlobPath>$(RelativePath)/$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
115       </ItemsToPush>
116     </ItemGroup>
117
118     <PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
119                     ExpectedFeedUrl="$(ExpectedFeedUrl)"
120                     AccountKey="$(AccountKey)"
121                     ItemsToPush="@(ItemsToPush)"
122                     Overwrite="$(OverwriteOnPublish)" />
123
124     <!-- create the container if it doesn't exist -->
125     <CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
126                           AccountKey="$(AccountKey)"
127                           AccountName="$(AccountName)"
128                           ContainerName="$(ContainerName)"
129                           IsPublic="false" />
130
131     <!-- now upload the items -->
132     <UploadToAzure  Condition="'$(PublishFlatContainer)' == 'true'"
133                     AccountKey="$(AccountKey)"
134                     AccountName="$(AccountName)"
135                     ContainerName="$(ContainerName)"
136                     Items="@(ItemsToPush)"
137                     Overwrite="$(OverwriteOnPublish)" />
138   </Target>
139
140   <Target Name="PublishAllSymbols" 
141           DependsOnTargets="SetupPublishSymbols;PublishSymbols" />
142
143   <Target Name="SetupPublishSymbols">
144     <PropertyGroup>
145       <ConvertPortablePdbsToWindowsPdbs Condition="'$(ConvertPortablePdbsToWindowsPdbs)'==''">true</ConvertPortablePdbsToWindowsPdbs>
146       <SymbolVerboseLogging>true</SymbolVerboseLogging>
147     </PropertyGroup>
148     <ItemGroup>
149       <SymbolPackagesToPublish Include="$(SymbolsPackagesPattern)" />
150     </ItemGroup>
151     <Error Condition="'$(SymbolServerPath)'==''" Text="Missing property SymbolServerPath" />
152     <Error Condition="'$(SymbolServerPAT)'==''" Text="Missing property SymbolServerPAT" />
153     <Message Importance="High" Text="Publishing @(SymbolPackagesToPublish) to $(SymbolServerPath)"/>
154   </Target>
155
156   <Target Name="Build" DependsOnTargets="PublishPackages;PublishSymbolPackages;PublishTestNativeBinaries"/>
157 </Project>