Skip to content

Commit

Permalink
Add --rid top level option (#41540)
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Jun 13, 2024
1 parent 1acd427 commit 3ed3bf6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/SourceBuild/content/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ usage()
echo "Common settings:"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --rid, --target-rid <value> 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 <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo ""

Expand Down Expand Up @@ -87,6 +88,7 @@ ci=false
exclude_ci_binary_log=false
prepare_machine=false
use_dev_versioning=false
target_rid=

properties=()
while [[ $# > 0 ]]; do
Expand All @@ -100,6 +102,10 @@ while [[ $# > 0 ]]; do
configuration=$2
shift
;;
-rid|-target-rid)
target_rid=$2
shift
;;
-verbosity|-v)
verbosity=$2
shift
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3ed3bf6

Please sign in to comment.