Skip to content

Commit b7aa14c

Browse files
tmdsViktorHofer
andauthored
eng/build.sh: support --warnaserror flag. (#62015)
* eng/build.sh: support --warnaserror flag. * Update eng/build.sh Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> --------- Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
1 parent a5306f6 commit b7aa14c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

eng/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ runtime_source_feed=''
3737
runtime_source_feed_key=''
3838
source_build=''
3939
product_build=''
40+
warn_as_error=true
4041

4142
if [ "$(uname)" = "Darwin" ]; then
4243
target_os_name='osx'
@@ -86,6 +87,7 @@ Options:
8687
--binarylog|-bl Use a binary logger
8788
--excludeCIBinarylog Don't output binary log by default in CI builds (short: -nobl).
8889
--verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
90+
--warnAsError Sets warnaserror msbuild parameter: 'true' or 'false'
8991
9092
--runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
9193
--runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
@@ -259,6 +261,11 @@ while [[ $# -gt 0 ]]; do
259261
-productbuild|-product-build|-pb)
260262
product_build=true
261263
;;
264+
-warnaserror)
265+
shift
266+
[ -z "${1:-}" ] && __error "Missing value for parameter --warnaserror" && __usage
267+
warn_as_error="${1:-}"
268+
;;
262269
*)
263270
msbuild_args[${#msbuild_args[*]}]="$1"
264271
;;

0 commit comments

Comments
 (0)