-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathbuild.build.ps1
More file actions
43 lines (38 loc) · 1.24 KB
/
build.build.ps1
File metadata and controls
43 lines (38 loc) · 1.24 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
<#
.SYNOPSIS
./project.build.ps1
.EXAMPLE
Invoke-Build
#>
[CmdletBinding()]
param(
[ValidateScript(
{
Convert-Path @(
"../../[tT]asks/powershell/base.ps1"
)
}
)]
$Extends
)
Write-Information "$($PSStyle.Foreground.BrightMagenta)build.build.ps1$($PSStyle.Reset)"
## Self-contained build script - can be invoked directly or via Invoke-Build
if ($MyInvocation.ScriptName -notlike '*Invoke-Build.ps1') {
. (Convert-Path ../../[tT]asks/scripts/Invoke-Build.ps1) -File $MyInvocation.MyCommand.Path @PSBoundParameters -Result Result
if ($Result.Error) {
$Error[-1].ScriptStackTrace | Out-Host
exit 1
}
exit 0
}
Write-Information "$($PSStyle.Foreground.BrightMagenta)Define Tasks$($PSStyle.Reset)"
# Define your preferred default build for local dev:
Add-BuildTask . Initialize, Build, Test
# Each build is responsible to define the five core tasks for CI
# But each base adds opinionated tasks to these variables
# So it's usually safe to just use these:
Add-BuildTask Initialize $script:InitializeTasks
Add-BuildTask Build $script:BuildTasks
Add-BuildTask Test $script:TestTasks
Add-BuildTask Publish $script:PublishTasks
Add-BuildTask Push $script:PushTasks