1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00
Satori/eng/notSupported.SourceBuild.targets
Anirudh Agnihotry a01c3abe20
Adding a ci leg for Source build (#36141)
* successfullsource build

* adding a new source build leg.

* remove yy

* add default vlaue

* addressing feedback

* use boolean value

* addind comment and other feedback

* adding colon and removing unintentional change

* adding default value of isSourceBUild
2020-05-19 14:44:01 -07:00

29 lines
No EOL
1.7 KiB
XML

<Project>
<Target Name="_RedefineNotSupportedSourceFile"
BeforeTargets="BeforeCompile"
Condition="'$(DotNetBuildFromSource)' == 'true' and
('$(GeneratePlatformNotSupportedAssembly)' == 'true' or '$(GeneratePlatformNotSupportedAssemblyMessage)' != '')">
<PropertyGroup>
<DotNetSourceBuildIntermediatePath Condition="'$(DotNetSourceBuildIntermediatePath)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">$(IntermediateOutputPath)</DotNetSourceBuildIntermediatePath>
</PropertyGroup>
<Error Condition="'$(DotNetSourceBuildIntermediatePath)' == ''"
Text="'DotNetSourceBuildIntermediatePath' must be specified when 'DotNetBuildFromSource' is true" />
<PropertyGroup>
<_notSupportedSourceDirectory>$([MSBuild]::NormalizeDirectory('$(DotNetSourceBuildIntermediatePath)', '$(MSBuildProjectName)', '$(TargetFramework)-$(TargetOS)'))</_notSupportedSourceDirectory>
<NotSupportedSourceFile>$(_notSupportedSourceDirectory)$(TargetName).notsupported.cs</NotSupportedSourceFile>
</PropertyGroup>
<MakeDir Condition="'$(DotNetBuildOffline)' != 'true'" Directories="$(_notSupportedSourceDirectory)" />
<Error Condition="'$(DotNetBuildOffline)' == 'true' and !Exists('$(NotSupportedSourceFile)')"
Text="Error NotSupportedSourceFile '$(NotSupportedSourceFile)' did not exist under DotNetSourceBuildIntermediatePath." />
<!-- DotNetBuildOffline == true, don't use GenAPI and include source from DotNetSourceBuildIntermediatePath -->
<ItemGroup Condition="'$(DotNetBuildOffline)' == 'true'">
<Compile Include="$(NotSupportedSourceFile)" />
</ItemGroup>
</Target>
</Project>