forked from joelverhagen/TorSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
25 lines (19 loc) · 896 Bytes
/
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
. (Join-Path $PSScriptRoot "build\common.ps1")
if (!(Test-Path $buildDir)) {
New-Item -Type Directory $buildDir | Out-Null
}
if (!(Test-Path $nuget)) {
Write-Host "Downloading nuget.exe..." -ForegroundColor DarkGreen
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/v5.8.0/nuget.exe" -OutFile $nuget
$ProgressPreference = 'Continue'
Write-Host "Downloaded nuget.exe to $nuget"
}
Write-Host "[ Restoring solution packages ]" -ForegroundColor DarkGreen
Exec { & $nuget install (Join-Path $repoDir "packages.config") -Output $packagesDir -ExcludeVersion }
if ($LASTEXITCODE -ne 0) {
throw "Failed to restore solution packages."
}
& (Join-Path $repoDir "build\set-version.ps1")
Write-Host "[ Building ]" -ForegroundColor DarkGreen
Exec { dotnet build --configuration Release /p:ContinuousIntegrationBuild=true }