зеркало из https://github.com/dotnet/fsharp.git
151 строка
7.4 KiB
XML
151 строка
7.4 KiB
XML
<Project>
|
|
|
|
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
|
<Import Project="eng\targets\Imports.targets" />
|
|
<Import Project="eng\targets\NGenBinaries.targets" />
|
|
<Import Project="eng\targets\NuGet.targets" />
|
|
<Import Project="FSharp.Profiles.props" />
|
|
|
|
<ItemDefinitionGroup>
|
|
<NoneSubstituteText>
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
<Pattern1></Pattern1>
|
|
<Pattern2></Pattern2>
|
|
<Pattern3></Pattern3>
|
|
<Replacement1></Replacement1>
|
|
<Replacement2></Replacement2>
|
|
<Replacement3></Replacement3>
|
|
<_ReplacementText></_ReplacementText>
|
|
<IncludeInVsix>false</IncludeInVsix>
|
|
<Link></Link>
|
|
<SubDir></SubDir>
|
|
</NoneSubstituteText>
|
|
</ItemDefinitionGroup>
|
|
|
|
<Target Name="NoneSubstituteTextFiles"
|
|
Inputs="@(NoneSubstituteText)"
|
|
Outputs="@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
|
|
BeforeTargets="AssignTargetPaths;BeforeBuild;GenerateFSharpTextResources">
|
|
|
|
<ItemGroup>
|
|
<NoneSubstituteText Update="@(NoneSubstituteText)">
|
|
<__TargetFilePath>$(IntermediateOutputPath)%(Subdir)%(Filename)%(Extension)</__TargetFilePath>
|
|
<__TargetFileName>%(Filename)%(Extension)</__TargetFileName>
|
|
<_ReplacementText>$([System.IO.File]::ReadAllText('%(FullPath)'))</_ReplacementText>
|
|
</NoneSubstituteText>
|
|
<NoneSubstituteText Update="@(NoneSubstituteText)">
|
|
<_ReplacementText Condition="'%(Pattern1)' != ''">$([System.Text.RegularExpressions.Regex]::Replace('%(_ReplacementText)', '%(Pattern1)', '%(Replacement1)'))</_ReplacementText>
|
|
</NoneSubstituteText>
|
|
<NoneSubstituteText Update="@(NoneSubstituteText)">
|
|
<_ReplacementText Condition="'%(Pattern2)' != ''">$([System.Text.RegularExpressions.Regex]::Replace('%(_ReplacementText)', '%(Pattern2)', '%(Replacement2)'))</_ReplacementText>
|
|
</NoneSubstituteText>
|
|
<NoneSubstituteText Update="@(NoneSubstituteText)">
|
|
<_ReplacementText Condition="'%(Pattern3)' != ''">$([System.Text.RegularExpressions.Regex]::Replace('%(_ReplacementText)', '%(Pattern3)', '%(Replacement3)'))</_ReplacementText>
|
|
</NoneSubstituteText>
|
|
</ItemGroup>
|
|
|
|
<MakeDir Directories="$(IntermediateOutputPath)" Condition="!Exists('$(IntermediateOutputPath)')" />
|
|
<WriteLinesToFile File="%(NoneSubstituteText.__TargetFilePath)" Lines="%(NoneSubstituteText._ReplacementText)" Overwrite="true" WriteOnlyWhenDifferent="true" />
|
|
|
|
<ItemGroup>
|
|
<None Include="%(NoneSubstituteText.__TargetFilePath)" CopyToOutputDirectory="%(NoneSubstituteText.CopyToOutputDirectory)" Condition="'%(NoneSubstituteText.SubDir)'==''" />
|
|
<_NoneWithTargetPath Include="%(NoneSubstituteText.__TargetFilePath)" CopyToOutputDirectory="%(NoneSubstituteText.CopyToOutputDirectory)" TargetPath="%(SubDir)%(__TargetFileName)" Condition="'%(NoneSubstituteText.SubDir)'!=''"/>
|
|
<FileWrites Include="%(NoneSubstituteText.__TargetFilePath)" Condition="'%(NoneSubstituteText.__TargetFileName)' != 'App.config'" />
|
|
<Content Include="%(NoneSubstituteText.__TargetFilePath)" CopyToOutputDirectory="Always" IncludeInVsix="true" Link="%(NoneSubstituteText.Link)" Condition="'%(NoneSubstituteText.IncludeInVsix)'=='true'" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="_GenerateBuildPropertiesFile"
|
|
Outputs="$(IntermediateOutputPath)buildproperties.fs"
|
|
BeforeTargets="BeforeBuild"
|
|
Condition="'$(Language)'=='F#'">
|
|
|
|
<ItemGroup>
|
|
<_BuildPropertyLines Remove="@(_BuildPropertyLines)" />
|
|
<_BuildPropertyLines Include="// <auto-generated >" />
|
|
<_BuildPropertyLines Include="// <Generated by the FSharp WriteCodeFragment class./>" />
|
|
<_BuildPropertyLines Include="// </auto-generated/>" />
|
|
<_BuildPropertyLines Include="//" />
|
|
<_BuildPropertyLines Include="module internal FSharp.BuildProperties" />
|
|
<_BuildPropertyLines Include="let fsProductVersion = "$(FSPRODUCTVERSION)"" />
|
|
<_BuildPropertyLines Include="let fsLanguageVersion = "$(FSLANGUAGEVERSION)"" />
|
|
</ItemGroup>
|
|
|
|
<MakeDir
|
|
Directories="$(IntermediateOutputPath)"
|
|
Condition="!Exists('$(IntermediateOutputPath)')" />
|
|
<WriteLinesToFile File="$(IntermediateOutputPath)buildproperties.fs" Lines="@(_BuildPropertyLines)" Overwrite="true" WriteOnlyWhenDifferent="true" />
|
|
|
|
<!-- Make sure it will get cleaned -->
|
|
<ItemGroup>
|
|
<CompileBefore Include="$(IntermediateOutputPath)buildproperties.fs" />
|
|
<FsGeneratedSource Include="$(IntermediateOutputPath)buildproperties.fs" />
|
|
<FileWrites Include="$(IntermediateOutputPath)buildproperties.fs" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="BeforeResGen"
|
|
Inputs="@(EmbeddedResource->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
|
|
Outputs="@(EmbeddedResource->'$(IntermediateOutputPath)resources\%(Filename)%(Extension)')"
|
|
Condition="'$(Configuration)' != 'Proto' and '$(Language)'=='F#' and '$(DisableCompilerRedirection)' != 'true' ">
|
|
|
|
<MakeDir Directories="$(IntermediateOutputPath)" Condition="!Exists('$(IntermediateOutputPath)')" />
|
|
<MakeDir Directories="$(IntermediateOutputPath)resources\" Condition="!Exists('$(IntermediateOutputPath)resources\')" />
|
|
|
|
<SubstituteText EmbeddedResources="@(EmbeddedResource)">
|
|
<Output TaskParameter="CopiedFiles" ItemName="CopiedFiles" />
|
|
</SubstituteText>
|
|
|
|
<ItemGroup>
|
|
<IntermediateFiles Include="$(IntermediateOutputPath)\*.resx" />
|
|
<IntermediateResourcesFiles Include="$(IntermediateOutputPath)resources\*.resx" />
|
|
</ItemGroup>
|
|
|
|
<!-- IntermediateFiles Hashes -->
|
|
<GetFileHash Files="@(IntermediateFiles)">
|
|
<Output
|
|
TaskParameter="Items"
|
|
ItemName="IntermediateFilesHashes" />
|
|
</GetFileHash>
|
|
|
|
<Hash ItemsToHash="@(IntermediateFilesHashes->'%(FileHash)')">
|
|
<Output TaskParameter="HashResult" PropertyName="IntermediateFilesHash" />
|
|
</Hash>
|
|
|
|
<!-- CopiedFilesForHash Hashes -->
|
|
<GetFileHash Files="@(IntermediateResourceFilesForHash)">
|
|
<Output
|
|
TaskParameter="Items"
|
|
ItemName="IntermediateResourceFilesHashes" />
|
|
</GetFileHash>
|
|
|
|
<Hash ItemsToHash="@(IntermediateResourceFilesHashes->'%(FileHash)')">
|
|
<Output TaskParameter="HashResult" PropertyName="IntermediateResourceFilesHash" />
|
|
</Hash>
|
|
|
|
<!-- Update EmbeddedResources -->
|
|
<ItemGroup Condition="'$(IntermediateFilesHash)' != '$(IntermediateResourceFilesHash)'">
|
|
<EmbeddedResource Remove="@(EmbeddedResource)"/>
|
|
<EmbeddedResource Include="@(CopiedFiles)"/>
|
|
</ItemGroup>
|
|
|
|
<Copy SourceFiles="@(CopyVsixResources)" DestinationFolder="$(IntermediateOutputPath)\resources\Resources" Condition="'$(IntermediateFilesHash)' != '$(IntermediateResourceFilesHash)'" />
|
|
</Target>
|
|
|
|
<PropertyGroup>
|
|
<CoreBuildDependsOn>$(CoreBuildDependsOn);PrefixRepoToReleaseNotes</CoreBuildDependsOn>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="PrefixRepoToReleaseNotes"
|
|
BeforeTargets="InitializeStandardNuspecProperties"
|
|
DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager"
|
|
Condition="'$(IsPackable)'=='true'">
|
|
|
|
<PropertyGroup>
|
|
<_GitUrl>$([System.Text.RegularExpressions.Regex]::Replace($(ScmRepositoryUrl), ".git$", ""))</_GitUrl>
|
|
<PackageReleaseNotes>$(_GitUrl)$(PackageReleaseNotes)</PackageReleaseNotes>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
</Project>
|