diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index 086c56a209c8..53acf372e6cf 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -12,6 +12,7 @@ usage() echo "Common settings:" echo " --binaryLog Create MSBuild binary log (short: -bl)" echo " --configuration Build configuration: 'Debug' or 'Release' (short: -c)" + echo " --rid, --target-rid Overrides the rid that is produced by the build. e.g. alpine.3.18-arm64, fedora.37-x64, freebsd.13-arm64, ubuntu.19.10-x64" echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" echo "" @@ -87,6 +88,7 @@ ci=false exclude_ci_binary_log=false prepare_machine=false use_dev_versioning=false +target_rid= properties=() while [[ $# > 0 ]]; do @@ -100,6 +102,10 @@ while [[ $# > 0 ]]; do configuration=$2 shift ;; + -rid|-target-rid) + target_rid=$2 + shift + ;; -verbosity|-v) verbosity=$2 shift @@ -280,6 +286,9 @@ fi source $scriptroot/eng/common/native/init-os-and-arch.sh source $scriptroot/eng/common/native/init-distro-rid.sh initDistroRidGlobal "$os" "$arch" "" +if [[ -n "$target_rid" ]]; then + properties+=( "/p:TargetRid=$target_rid" ) +fi # Source-only settings if [[ "$sourceOnly" == "true" ]]; then