diff options
author | Jo Shields <joshield@microsoft.com> | 2019-05-02 17:24:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 17:24:10 +0300 |
commit | 748da2e4a93e820540f857ee8c6d3f752141f4de (patch) | |
tree | 33627940240d5ba4863da6ab11fd52c479c0c100 /eng/common/msbuild.sh | |
parent | c9c50f85f4ea7368b1aeaaed27564fcf6a1a3609 (diff) |
[netcore] Onboard Arcade (#14301)
Diffstat (limited to 'eng/common/msbuild.sh')
-rwxr-xr-x | eng/common/msbuild.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/eng/common/msbuild.sh b/eng/common/msbuild.sh new file mode 100755 index 00000000000..8160cd5a59d --- /dev/null +++ b/eng/common/msbuild.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +verbosity='minimal' +warn_as_error=true +node_reuse=true +prepare_machine=false +extra_args='' + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --verbosity) + verbosity=$2 + shift 2 + ;; + --warnaserror) + warn_as_error=$2 + shift 2 + ;; + --nodereuse) + node_reuse=$2 + shift 2 + ;; + --ci) + ci=true + shift 1 + ;; + --preparemachine) + prepare_machine=true + shift 1 + ;; + *) + extra_args="$extra_args $1" + shift 1 + ;; + esac +done + +. "$scriptroot/tools.sh" + +if [[ "$ci" == true ]]; then + node_reuse=false +fi + +MSBuild $extra_args +ExitWithExitCode 0 |