Skip to content

eng/build.sh: support --warnaserror flag. #62015

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 2 commits into from
May 21, 2025
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
7 changes: 7 additions & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ runtime_source_feed=''
runtime_source_feed_key=''
source_build=''
product_build=''
warn_as_error=true

if [ "$(uname)" = "Darwin" ]; then
target_os_name='osx'
Expand Down Expand Up @@ -86,6 +87,7 @@ Options:
--binarylog|-bl Use a binary logger
--excludeCIBinarylog Don't output binary log by default in CI builds (short: -nobl).
--verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
--warnAsError Sets warnaserror msbuild parameter: 'true' or 'false'

--runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
--runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
Expand Down Expand Up @@ -259,6 +261,11 @@ while [[ $# -gt 0 ]]; do
-productbuild|-product-build|-pb)
product_build=true
;;
-warnaserror)
shift
[ -z "${1:-}" ] && __error "Missing value for parameter --warnaserror" && __usage
warn_as_error="${1:-}"
;;
*)
msbuild_args[${#msbuild_args[*]}]="$1"
;;
Expand Down
Loading