-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
33 lines (28 loc) · 1.09 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
Param(
[string]$Target = "Default",
[ValidateSet("Release", "Debug")]
[string]$Configuration = "Release",
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity = "Verbose",
[string]$PublishUrl,
[string]$PublishKey
)
$rootDir = Split-Path -parent $MyInvocation.MyCommand.Definition;
$toolsDir = Join-Path $rootDir "tools"
$nugetExeBoot = Join-Path $toolsDir "nuget-bootstrap.ps1"
$nugetExe = Join-Path $toolsDir "nuget.exe"
$packagesDir = Join-Path $toolsDir "packages"
$cakeExe = Join-Path $packagesDir "cake/cake.exe"
# Ensure nuget.exe
& $nugetExeBoot -nugetExePath $nugetExe
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
# Restore tools from NuGet
& $nugetExe install "Codestellation.Nova.CakeBuild" -version 1.0.3 -excludeVersion -outputDirectory $packagesDir
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
# Start Cake
& $cakeExe "build.cake" -target="$Target" -configuration="$Configuration" -verbosity="$Verbosity" -publishUrl="$PublishUrl" -publishKey="$PublishKey" -experimental
exit $lastExitCode