7d4706c3d7
Former-commit-id: 066e1c5ebb0cc420bd293e60a01325420779fdd1
39 lines
2.0 KiB
XML
39 lines
2.0 KiB
XML
<Project Sdk="Microsoft.Build.Traversal">
|
|
<ItemGroup>
|
|
<ProjectReference Include="Microsoft.NETCore.Runtime.Mono.LLVM.Sdk\Microsoft.NETCore.Runtime.Mono.LLVM.Sdk.builds" />
|
|
<ProjectReference Include="Microsoft.NETCore.Runtime.Mono.LLVM.Tools\Microsoft.NETCore.Runtime.Mono.LLVM.Tools.builds" />
|
|
</ItemGroup>
|
|
|
|
<!-- Generate a version.txt file we include in our packages
|
|
The InitializeSourceControlInformationFromSourceControlManager is part of Microsoft.Build.Tasks.Git
|
|
and is responsible for setting SourceRevisionId -->
|
|
<!-- TODO: doesn't work for some reason
|
|
<Target Name="GenerateVersionInfoFileForPackages"
|
|
BeforeTargets="Build"
|
|
DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager">
|
|
|
|
<Error Condition="'$(SourceRevisionId)' == ''" Text="SourceRevisionId is not set, which means the SourceLink targets are not included in the build. Those are needed to produce a correct sha for our build outputs." />
|
|
|
|
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(VersionTxtFile)))" />
|
|
<WriteLinesToFile
|
|
File="$(VersionTxtFile)"
|
|
Lines="$(SourceRevisionId)"
|
|
Overwrite="true" />
|
|
</Target>
|
|
-->
|
|
|
|
<!-- Update the project references with additional properties calculated during the execution phase.
|
|
_InitializeAssemblyVersion is provided by Arcade. It sets the AssemblyVersion and FileVersion properties.
|
|
We depend on this private Arcade target instead of the SDK-defined GetAssemblyVersion since the packaging
|
|
build does not use the .NET SDK -->
|
|
<Target Name="UpdateAdditionalProperties"
|
|
BeforeTargets="Build"
|
|
DependsOnTargets="_InitializeAssemblyVersion">
|
|
<ItemGroup>
|
|
<!-- Pass the FileVersion calculated by _InitializeAssemblyVersion to referenced projects -->
|
|
<ProjectReference Update="@(ProjectReference)"
|
|
AdditionalProperties="%(AdditionalProperties);FileVersion=$(FileVersion)" />
|
|
</ItemGroup>
|
|
</Target>
|
|
</Project>
|