[2020-02] Bump msbuild to track mono-2019-12 (#19661)
[mono-project.git] / eng / common / msbuild.sh
blob8160cd5a59d1729cfacbc90f658f7b5d5e066cc2
1 #!/usr/bin/env bash
3 source="${BASH_SOURCE[0]}"
5 # resolve $source until the file is no longer a symlink
6 while [[ -h "$source" ]]; do
7 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
8 source="$(readlink "$source")"
9 # if $source was a relative symlink, we need to resolve it relative to the path where the
10 # symlink file was located
11 [[ $source != /* ]] && source="$scriptroot/$source"
12 done
13 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
15 verbosity='minimal'
16 warn_as_error=true
17 node_reuse=true
18 prepare_machine=false
19 extra_args=''
21 while (($# > 0)); do
22 lowerI="$(echo $1 | awk '{print tolower($0)}')"
23 case $lowerI in
24 --verbosity)
25 verbosity=$2
26 shift 2
28 --warnaserror)
29 warn_as_error=$2
30 shift 2
32 --nodereuse)
33 node_reuse=$2
34 shift 2
36 --ci)
37 ci=true
38 shift 1
40 --preparemachine)
41 prepare_machine=true
42 shift 1
45 extra_args="$extra_args $1"
46 shift 1
48 esac
49 done
51 . "$scriptroot/tools.sh"
53 if [[ "$ci" == true ]]; then
54 node_reuse=false
57 MSBuild $extra_args
58 ExitWithExitCode 0