forked from dotnet/toolset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-build.ps1
28 lines (23 loc) · 908 Bytes
/
run-build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# 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.
#
param(
[string]$Configuration="Debug",
[string]$Architecture="x64",
[Parameter(ValueFromRemainingArguments=$true)][String[]]$ExtraParameters
)
$env:CONFIGURATION = $Configuration;
$RepoRoot = "$PSScriptRoot"
if(!$env:NUGET_PACKAGES){
$env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages"
}
$InstallArchitecture = $Architecture
if($Architecture.StartsWith("arm", [StringComparison]::OrdinalIgnoreCase))
{
$InstallArchitecture = "x64"
}
$ArchitectureParam="/p:Architecture=$Architecture"
$ConfigurationParam="-configuration $Configuration"
Invoke-Expression "$RepoRoot\eng\common\build.ps1 -restore -build $ConfigurationParam $ArchitectureParam $ExtraParameters"
if($LASTEXITCODE -ne 0) { throw "Failed to build" }