Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create logs by default when building SDK on non-Windows OS #1584

Merged
merged 3 commits into from
Sep 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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[@]}"