-
Notifications
You must be signed in to change notification settings - Fork 190
Expand file tree
/
Copy pathbootstrap.ps1
More file actions
47 lines (38 loc) · 1.05 KB
/
bootstrap.ps1
File metadata and controls
47 lines (38 loc) · 1.05 KB
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
44
45
46
47
[CmdletBinding()]
param()
$ErrorActionPreference = "Stop"
$repoRoot = $PSScriptRoot
$originalLocation = Get-Location
function Invoke-BootstrapStep {
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[scriptblock]$Action
)
Write-Host ""
Write-Host "==> $Name"
$global:LASTEXITCODE = 0
& $Action
if ($LASTEXITCODE -ne $null -and $LASTEXITCODE -ne 0) {
throw "$Name failed with exit code $LASTEXITCODE."
}
}
try {
Invoke-BootstrapStep "Pull CEF" {
& (Join-Path $repoRoot "IntelPresentMon\AppCef\Batch\pull-cef.ps1")
}
Invoke-BootstrapStep "Pull auxiliary test data" {
& (Join-Path $repoRoot "Tests\pull-aux.ps1")
}
Invoke-BootstrapStep "Build frontend" {
Push-Location (Join-Path $repoRoot "IntelPresentMon\AppCef")
try {
& (Join-Path $repoRoot "IntelPresentMon\AppCef\Batch\build-web.bat")
} finally {
Pop-Location
}
}
} finally {
Set-Location $originalLocation
}