Stop making tools.sh changes during source-build (#17664)
Co-authored-by: Michael Simons <msimons@microsoft.com>
This commit is contained in:
parent
b9f8a4b0ed
commit
e051067c46
3 changed files with 56 additions and 23 deletions
|
@ -58,29 +58,6 @@
|
|||
NewText="$(NewText)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateBuildToolFramework"
|
||||
BeforeTargets="Build"
|
||||
Condition="'$(EngCommonToolsShFile)' != ''"
|
||||
Inputs="$(MSBuildProjectFullPath)"
|
||||
Outputs="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" >
|
||||
|
||||
<!-- Update the BuildToolFramework for repos that have not adopted the current version of Arcade-->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="netcoreapp3.1""
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)"" />
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="net7.0""
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)"" />
|
||||
|
||||
<!-- 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 -->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="ExitWithExitCode 0"
|
||||
NewText="ExitWithExitCode $exit_code" />
|
||||
|
||||
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateNuGetConfig"
|
||||
BeforeTargets="Build"
|
||||
Condition="'$(NuGetConfigFile)' != '' OR '@(NuGetConfigFiles)' != ''"
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nikola Milosavljevic <nikolam@microsoft.com>
|
||||
Date: Mon, 30 Oct 2023 22:45:58 +0000
|
||||
Subject: [PATCH] Allow override of build tool framework version
|
||||
|
||||
Backport: https://github.com/dotnet/command-line-api/pull/2283
|
||||
---
|
||||
eng/common/tools.sh | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
|
||||
index 2f27d745..422e711d 100644
|
||||
--- a/eng/common/tools.sh
|
||||
+++ b/eng/common/tools.sh
|
||||
@@ -312,7 +312,12 @@ function InitializeBuildTool {
|
||||
# return values
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildToolCommand="msbuild"
|
||||
- _InitializeBuildToolFramework="net7.0"
|
||||
+ # use override if it exists - commonly set by source-build
|
||||
+ if [[ -z "${_OverrideArcadeInitializeBuildToolFramework}" ]]; then
|
||||
+ _InitializeBuildToolFramework="net7.0"
|
||||
+ else
|
||||
+ _InitializeBuildToolFramework="${_OverrideArcadeInitializeBuildToolFramework}"
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
|
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nikola Milosavljevic <nikolam@microsoft.com>
|
||||
Date: Mon, 30 Oct 2023 22:52:31 +0000
|
||||
Subject: [PATCH] Allow override of build tool framework version
|
||||
|
||||
Backport: https://github.com/dotnet/aspnetcore/issues/51753
|
||||
---
|
||||
eng/common/tools.sh | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
|
||||
index 17f0a36..343490c 100755
|
||||
--- a/eng/common/tools.sh
|
||||
+++ b/eng/common/tools.sh
|
||||
@@ -312,7 +312,12 @@ function InitializeBuildTool {
|
||||
# return values
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildToolCommand="msbuild"
|
||||
- _InitializeBuildToolFramework="netcoreapp3.1"
|
||||
+ # use override if it exists - commonly set by source-build
|
||||
+ if [[ -z "${_OverrideArcadeInitializeBuildToolFramework}" ]]; then
|
||||
+ _InitializeBuildToolFramework="netcoreapp3.1"
|
||||
+ else
|
||||
+ _InitializeBuildToolFramework="${_OverrideArcadeInitializeBuildToolFramework}"
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
|
Loading…
Reference in a new issue