Skip to content

Commit 8e5493e

Browse files
authored
Pass thru command line args to RepoTasks build (#61040)
* Pass thru command line args to RepoTasks build * Fixup * Fixup * Spacing * Append * Remove comment * Fixup * Consistency
1 parent caa429c commit 8e5493e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

eng/build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
250250
}
251251
}
252252

253+
$CommandLineArguments = $MSBuildArguments
254+
253255
if ($NoBuildDeps) { $MSBuildArguments += "/p:BuildProjectReferences=false" }
254256

255257
$RunBuild = if ($NoBuild) { $false } else { $true }
@@ -478,7 +480,8 @@ try {
478480
/p:Restore=$RunRestore `
479481
/p:Build=true `
480482
/clp:NoSummary `
481-
@ToolsetBuildArguments
483+
@ToolsetBuildArguments `
484+
@CommandLineArguments
482485
}
483486

484487
if (-not $OnlyBuildRepoTasks) {

eng/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ while [[ $# -gt 0 ]]; do
249249
shift
250250
done
251251

252+
commandline_args=()
253+
254+
if [ ${#msbuild_args[@]} -gt 0 ]; then
255+
commandline_args=("${msbuild_args[@]}")
256+
fi
257+
252258
if [ "$build_all" = true ]; then
253259
msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true"
254260
fi
@@ -388,6 +394,10 @@ InitializeToolset
388394

389395
restore=$_tmp_restore=
390396

397+
if [ ${#commandline_args[@]} -gt 0 ]; then
398+
toolset_build_args+=("${commandline_args[@]}")
399+
fi
400+
391401
if [ "$build_repo_tasks" = true ]; then
392402
MSBuild $_InitializeToolset \
393403
-p:RepoRoot="$repo_root" \

0 commit comments

Comments
 (0)