forked from microsoft/VSSDK-Extensibility-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
43 lines (37 loc) · 1.08 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<#
.Synopsis
Acquires dependencies and builds all solutions in this repo.
.Parameter Configuration
The build configuration to build.
#>
[CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Medium')]
Param(
[ValidateSet('Debug','Release')]
$Configuration='Release'
)
$failed = @()
$AppVeyorLogger = "$env:ProgramFiles\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if (Test-Path $AppVeyorLogger) {
$Logger = "/logger:`"$AppVeyorLogger`""
}
Get-ChildItem $PSScriptRoot\*.sln -rec |% {
if ($_.Name -eq "BackwardsCompatibleAsyncPackage.sln")
{
Write-Output "Skipping $($_.Name) because it requires Visual Studio 2013 SDK."
return;
}
Write-Output "Restoring packages for $($_.Name)"
nuget restore $_ -Verbosity quiet
if ($LASTEXITCODE -ne 0) {
$failed += $_
} else {
Write-Output "Building $($_.Name)"
msbuild $_ /nologo /m /verbosity:minimal /p:Configuration=$Configuration $Logger
if ($LASTEXITCODE -ne 0) {
$failed += $_
}
}
}
if ($failed.length -gt 0) {
exit $failed.length
}