Skip to content

Add --rid top level option #41540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading