Skip to content

Commit

Permalink
Create logs by default when building SDK on non-Windows OS (#1584)
Browse files Browse the repository at this point in the history
* #1583

* Changing the single quote escape...

* Changing to a backslash escape of the semi-colons...
  • Loading branch information
johnbeisner authored Sep 13, 2017
1 parent 79dd157 commit 94b0a62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if ($Verbosity -eq 'diagnostic') {
}

# Install a stage 0
$DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
$DOTNET_INSTALL_SCRIPT_URL="https://dot.net/v1/dotnet-install.ps1"
Invoke-WebRequest $DOTNET_INSTALL_SCRIPT_URL -OutFile "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1"

& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Version $DotnetCLIVersion $dotnetInstallVerbosity
Expand All @@ -69,14 +69,14 @@ if (Test-Path $NETBuildExtensionsTargets)
# Install 1.0.4 shared framework
if (!(Test-Path "$env:DOTNET_INSTALL_DIR\shared\Microsoft.NETCore.App\1.0.5"))
{
& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Channel "Preview" -Version 1.0.5 -SharedRuntime
& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Version 1.0.5 -SharedRuntime
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
}

# Install 1.1.1 shared framework
if (!(Test-Path "$env:DOTNET_INSTALL_DIR\shared\Microsoft.NETCore.App\1.1.2"))
{
& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Channel "Release/1.1.0" -Version 1.1.2 -SharedRuntime
& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Version 1.1.2 -SharedRuntime
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
}

Expand Down
17 changes: 13 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ if [ -z "$HOME" ]; then
fi

# Install a stage 0
DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh"
DOTNET_INSTALL_SCRIPT_URL="https://dot.net/v1/dotnet-install.sh"
curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version $DOTNET_CLI_VERSION --verbose

# Install 1.0.4 shared framework
[ -d "$DOTNET_INSTALL_DIR/shared/Microsoft.NETCore.App/1.0.5" ] || curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --channel "Preview" --version "1.0.5" --shared-runtime
[ -d "$DOTNET_INSTALL_DIR/shared/Microsoft.NETCore.App/1.0.5" ] || curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version "1.0.5" --shared-runtime

# Install 1.1.1 shared framework
[ -d "$DOTNET_INSTALL_DIR/shared/Microsoft.NETCore.App/1.1.2" ] || curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --channel "Release/1.1.0" --version "1.1.2" --shared-runtime
[ -d "$DOTNET_INSTALL_DIR/shared/Microsoft.NETCore.App/1.1.2" ] || curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version "1.1.2" --shared-runtime

# Put stage 0 on the PATH
export PATH="$DOTNET_INSTALL_DIR:$PATH"
Expand All @@ -95,4 +95,13 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve runtime, shared framework, or SDK from global locations
export DOTNET_MULTILEVEL_LOOKUP=0

dotnet msbuild $REPOROOT/build/build.proj /m:1 /nologo /p:Configuration=$CONFIGURATION /p:Platform="$PLATFORM" "${args[@]}" /warnaserror
logPath="$REPOROOT/bin/log"
[ -d "$logPath" ] || mkdir -p $logPath

# NET Core Build
msbuildSummaryLog="$logPath/sdk.log"
msbuildWarningLog="$logPath/sdk.wrn"
msbuildFailureLog="$logPath/sdk.err"
msbuildBinLog="$logPath/sdk.binlog"

dotnet msbuild $REPOROOT/build/build.proj /m:1 /nologo /p:Configuration=$CONFIGURATION /p:Platform="$PLATFORM" /warnaserror /flp1:Summary\;Verbosity=diagnostic\;Encoding=UTF-8\;LogFile=$msbuildSummaryLog /flp2:WarningsOnly\;Verbosity=diagnostic\;Encoding=UTF-8\;LogFile=$msbuildWarningLog /flp3:ErrorsOnly\;Verbosity=diagnostic\;Encoding=UTF-8\;LogFile=$msbuildFailureLog /bl:$msbuildBinLog "${args[@]}"

0 comments on commit 94b0a62

Please sign in to comment.