-
Notifications
You must be signed in to change notification settings - Fork 501
/
Directory.Build.targets
45 lines (37 loc) · 2.17 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<Project>
<PropertyGroup>
<ReadMePath>$(MSBuildProjectDirectory)\README.md</ReadMePath>
<ReadMeExists Condition="Exists('$(ReadMePath)')">true</ReadMeExists>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' And '$(ReadMeExists)' == 'true'">README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup>
<PackageThirdPartyNoticesFile Condition="'$(PackageThirdPartyNoticesFile)' == ''">$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(PackageThirdPartyNoticesFile)" Pack="true" PackagePath="." />
</ItemGroup>
<Import Condition="'$(SampleProject)' == 'true' or '$(CI)' != 'true' " Project="eng\Versions.dev.targets" />
<Import Condition="'$(SampleProject)' != 'true' and '$(CI)' == 'true' " Project="eng\Versions.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<ItemGroup Condition="'$(ReadMeExists)' == 'true'">
<None Include="$(ReadMePath)" Pack="true" PackagePath="\" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)/apicompat/PublicApiAnalyzer.targets" />
<Import Project="$(RepositoryEngineeringDir)/NullablePolyfill.targets" />
<!-- HACK: This resolves issues in CI builds where the extensions.json file is mapped to the incorrect directory. We only want
to copy the updated extensions.json file once the `_FunctionsExtensionUpdateMetadata` target has completed. -->
<Target Name="_FunctionsAssignTargetPathsFix" AfterTargets="_FunctionsAssignTargetPaths" BeforeTargets="_FunctionsExtensionUpdateMetadata">
<ItemGroup>
<None Remove="$(_FunctionsIntermediateExtensionUpdatedJsonPath)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
TargetPath="$(_FunctionsExtensionsJsonName)" />
<None
Include="$(_FunctionsIntermediateExtensionUpdatedJsonPath)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
TargetPath="$(_FunctionsExtensionsJsonName)"
Condition="Exists('$(_FunctionsIntermediateExtensionUpdatedJsonPath)')"/>
</ItemGroup>
</Target>
</Project>