Get source-build working in main (#15315)
This commit is contained in:
parent
4e9a08ecf3
commit
4ff5179103
5 changed files with 16 additions and 47 deletions
|
@ -107,45 +107,16 @@
|
|||
Condition="'$(EngCommonToolsShFile)' != ''"
|
||||
Inputs="$(MSBuildProjectFullPath)"
|
||||
Outputs="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" >
|
||||
<!-- Use a relative find in NewText to avoid regex matches with parent directories.
|
||||
See https://github.com/dotnet/source-build/issues/1914 for details. -->
|
||||
<PropertyGroup>
|
||||
<ArcadeSdkReplacementText>
|
||||
logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.Arcade.Sdk.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net7.0.*' \) )
|
||||
</ArcadeSdkReplacementText>
|
||||
|
||||
<ArcadeLoggingReplacementText>
|
||||
logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.ArcadeLogging.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net7.0.*' \) )
|
||||
</ArcadeLoggingReplacementText>
|
||||
|
||||
<LoggerPathReplacementText>
|
||||
$(ArcadeLoggingReplacementText)
|
||||
if [[ ! -f $logger_path ]]; then
|
||||
$(ArcadeSdkReplacementText)
|
||||
fi
|
||||
</LoggerPathReplacementText>
|
||||
</PropertyGroup>
|
||||
<!-- Arcade has added a new ArcadeLogging library (see: https://github.com/dotnet/arcade/pull/6739)
|
||||
This adds additional scenarios when modifying tools.sh to search for the logger_path. Source-build
|
||||
builds arcade after the change, so the logger is no longer found in Microsoft.DotNet.Arcade.Sdk,
|
||||
rather, it has moved to Microsoft.DotNet.ArcadeLogging.
|
||||
The scenarios are: -->
|
||||
<!-- 1. Repo has old tools.sh - replace with new search for logger_path from updated tools.sh which looks for ArcadeLogging first,
|
||||
but make the source-build search changes to find the right dll. -->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll""
|
||||
NewText="$(LoggerPathReplacementText)" />
|
||||
<!-- 2. Repo has updated tools.sh, replace 2 logger_path statements with source-build search equivalents to find the right dll -->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll""
|
||||
NewText="$(ArcadeLoggingReplacementText)" />
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll""
|
||||
NewText="$(ArcadeSdkReplacementText)" />
|
||||
<!-- 3. Repo has 3rd generation of tools.sh. In this case, we set an override for _InitializeBuildToolFramework -->
|
||||
<!-- Update the BuildToolFramework for repos that have not adopted the current version of Arcade-->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="netcoreapp3.1""
|
||||
NewText="_InitializeBuildToolFramework="%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}"" />
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)""
|
||||
Condition="'$(UseBootstrapArcade)' != 'true'" />
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="net7.0""
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)""
|
||||
Condition="'$(UseBootstrapArcade)' != 'true'" />
|
||||
|
||||
<!-- Temporary workaround for when the ci option is specified, non-zero exit are swallowed which prevents builds from failing within
|
||||
the build process. https://github.com/dotnet/source-build/issues/2307 -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue