-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
bootstrap.ps1
28 lines (25 loc) · 945 Bytes
/
bootstrap.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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if (Test-Path "nuget.exe") {
Invoke-Expression "./nuget restore"
}
elseif((Get-Command "nuget" -ErrorAction SilentlyContinue) -ne $null) {
nuget restore
}
else {
"Nuget was not found and is required to run bootstrap.ps. Download and retry now?"
choice /c yn
if ($LASTEXITCODE -eq 1) {
"Downloading nuget..."
$nugetLocation = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
(New-Object Net.WebClient).DownloadFile($nugetLocation, "$PSScriptRoot\nuget.exe")
Invoke-Expression "./nuget restore"
}
}
try {
git --version
}
catch {
"Git was not found and is required to run bootstrap.bat. Download git from https://git-scm.com/download and during installation choose `"Use Git from the Windows Command Prompt`"."
}
Invoke-Expression "msbuild Bootstrap/Bootstrap.csproj /p:Configuration=Debug"
Invoke-Expression "./generate_resources.bat"