-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.ps1
51 lines (44 loc) · 1.49 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
44
45
46
47
48
49
50
51
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
.DESCRIPTION
Modern.PdbMonitor build bootstrap.
.PARAMETER Script
The build script to execute.
.PARAMETER Target
The build script target to run.
.PARAMETER Configuration
The build configuration to use.
.PARAMETER Verbosity
Specifies the amount of information to be displayed.
.PARAMETER ShowDescription
Shows description about tasks.
.LINK
https://cakebuild.net
#>
[CmdletBinding()]
Param(
[ValidateSet("Default", "Clean", "Build", "UnitTest", "PublishStandalone", "Publish", "GetProjectVersion")]
[string]$Target,
[string]$SolutionDirectory,
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity,
[switch]$ShowDescription,
[Alias("WhatIf", "Noop")]
[string]$ReleaseNotes
)
# Build Cake arguments
$cakeArguments = @("$Script")
if ($Target) { $cakeArguments += "--target=$Target" }
if ($SolutionDirectory) { $cakeArguments += "--solution-dir=$SolutionDirectory" }
if ($Verbosity) { $cakeArguments += "--verbosity=$Verbosity" }
if ($ShowDescription) { $cakeArguments += "--showdescription" }
#if ($DryRun) { $cakeArguments += "--dryrun" }
if ($ReleaseNotes) { $cakeArguments += "--releaseNotes=$ReleaseNotes" }
$cakeArguments += $ScriptArgs
if ($cakeArguments) {
dotnet run --project source/PdbMonitor.Builder/PdbMonitor.Builder/build/Build.csproj -- $cakeArguments
} else {
dotnet run --project source/PdbMonitor.Builder/PdbMonitor.Builder/build/Build.csproj
}
exit $LASTEXITCODE;