2018-11-08 01:21:16 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
#
|
|
|
|
|
2018-12-04 21:20:01 +00:00
|
|
|
[CmdletBinding(PositionalBinding=$false)]
|
2018-11-08 01:21:16 +00:00
|
|
|
param(
|
|
|
|
[string]$Configuration="Debug",
|
|
|
|
[string]$Architecture="x64",
|
|
|
|
[Parameter(ValueFromRemainingArguments=$true)][String[]]$ExtraParameters
|
|
|
|
)
|
|
|
|
|
|
|
|
$RepoRoot = "$PSScriptRoot"
|
|
|
|
|
|
|
|
$ArchitectureParam="/p:Architecture=$Architecture"
|
|
|
|
$ConfigurationParam="-configuration $Configuration"
|
2018-12-04 21:20:01 +00:00
|
|
|
try {
|
|
|
|
$ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build $ConfigurationParam $ArchitectureParam $ExtraParameters"
|
|
|
|
Write-Host "Invoking expression: $ExpressionToInvoke"
|
|
|
|
Invoke-Expression $ExpressionToInvoke
|
|
|
|
}
|
|
|
|
catch {
|
|
|
|
Write-Error $_
|
|
|
|
Write-Error $_.ScriptStackTrace
|
|
|
|
throw "Failed to build"
|
|
|
|
}
|
2018-11-08 01:21:16 +00:00
|
|
|
|
2018-12-26 03:08:40 +00:00
|
|
|
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|