diff options
author | Jeremy Kuhne <jeremy.kuhne@microsoft.com> | 2015-05-20 02:22:55 +0300 |
---|---|---|
committer | Jeremy Kuhne <jeremy.kuhne@microsoft.com> | 2015-05-20 02:54:53 +0300 |
commit | 615c09051f7b1facd6b88d15f38e79b576e3ca4c (patch) | |
tree | 122338c6b9d7c79729ad6af1c0761bd67087304a /build.sh | |
parent | ff4ffbeb470a020890ed6e2544aa6cb7cb7561b3 (diff) |
Consume MSBuild Mono package
Add the Mono MSBuild package and update the build script to consume it and restore tools via xbuild.
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,7 +1,8 @@ #!/bin/bash __scriptpath=$(cd "$(dirname "$0")"; pwd -P) -__msbuildpath=$__scriptpath/../msbuild/bin/Unix/Debug-MONO/MSBuild.exe +__packageroot=$__scriptpath/packages +__msbuildpath=$__packageroot/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/MSBuild.exe __referenceassemblyroot=/usr/lib/mono/xbuild-frameworks __monoversion=$(mono --version | grep "version 4.[1-9]") @@ -15,6 +16,12 @@ if [ ! -e "$__referenceassemblyroot/.NETPortable" ]; then exit 1 fi +__buildproj=$__scriptpath/build.proj +__buildlog=$__scriptpath/msbuild.log + +# Run the restore build tools under xbuild to get NuGet and MSBuild pulled down +xbuild "$__buildproj" /t:_RestoreBuildTools /nologo /verbosity:minimal "/fileloggerparameters:Verbosity=diag;LogFile=$__buildlog" + if [ ! -e "$__msbuildpath" ]; then echo "MSBuild.exe required at $__msbuildpath. Please see https://github.com/dotnet/corefx/wiki/Building-On-Unix for more details." exit 1 @@ -26,9 +33,6 @@ else __osgroup=OSX fi -__buildproj=$__scriptpath/build.proj -__buildlog=$__scriptpath/msbuild.log - MONO29679=1 ReferenceAssemblyRoot=$__referenceassemblyroot mono $__msbuildpath "$__buildproj" /nologo /verbosity:minimal "/fileloggerparameters:Verbosity=diag;LogFile=$__buildlog" /t:Build /p:OSGroup=$__osgroup /p:UseRoslynCompiler=true /p:COMPUTERNAME=$(hostname) /p:USERNAME=$(id -un) "$@" BUILDERRORLEVEL=$? |