From ed130749fe92758e6b4bba40828d92c8b17263b7 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Thu, 17 Aug 2023 09:44:36 -0700 Subject: [PATCH] [release/8.0.1xx-rc1] Update scripts to set distro RID and properties to use it as TargetRid (#17202) --- run-build.sh | 4 ++++ src/SourceBuild/content/Directory.Build.props | 11 +++++++---- src/SourceBuild/content/build.sh | 4 ++++ src/redist/targets/GetRuntimeInformation.targets | 2 ++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/run-build.sh b/run-build.sh index 3c9b27485..c380d75ce 100755 --- a/run-build.sh +++ b/run-build.sh @@ -63,4 +63,8 @@ while [[ $# > 0 ]]; do shift done +source $REPOROOT/eng/common/native/init-os-and-arch.sh +source $REPOROOT/eng/common/native/init-distro-rid.sh +initDistroRidGlobal "$os" "$arch" "" + . "$REPOROOT/eng/common/build.sh" --build --restore "${args[@]}" diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index cd4080e23..69262c7a8 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -158,6 +158,8 @@ + + $(__DistroRid) $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) Windows_NT @@ -165,10 +167,11 @@ Linux FreeBSD - freebsd-$(Platform) - osx-$(Platform) - linux-$(Platform) - win-$(Platform) + $(__PortableTargetOS)-$(Platform) + freebsd-$(Platform) + osx-$(Platform) + linux-$(Platform) + win-$(Platform) $(PortableRid) diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index e217a8323..a1224e436 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -247,6 +247,10 @@ echo "Found bootstrap SDK $SDK_VERSION, bootstrap Arcade $ARCADE_BOOTSTRAP_VERSI export DOTNET_CLI_TELEMETRY_OPTOUT=1 export NUGET_PACKAGES=$packagesRestoredDir/ +source $SCRIPT_ROOT/eng/common/native/init-os-and-arch.sh +source $SCRIPT_ROOT/eng/common/native/init-distro-rid.sh +initDistroRidGlobal "$os" "$arch" "" + LogDateStamp=$(date +"%m%d%H%M%S") "$CLI_ROOT/dotnet" build-server shutdown diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets index 6d216ff20..39f89415f 100644 --- a/src/redist/targets/GetRuntimeInformation.targets +++ b/src/redist/targets/GetRuntimeInformation.targets @@ -1,6 +1,8 @@ + + $(__DistroRid) $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)