forked from PlagueHO/LabBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
psake.ps1
42 lines (34 loc) · 1004 Bytes
/
psake.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
[CmdletBinding()]
param (
[Parameter()]
[System.String[]]
$TaskList = 'Default',
[Parameter()]
[System.Collections.Hashtable]
$Parameters,
[Parameter()]
[System.Collections.Hashtable]
$Properties
)
Write-Verbose -Message ('Beginning ''{0}'' process...' -f ($TaskList -join ','))
# Bootstrap the environment
$null = Get-PackageProvider -Name NuGet -ForceBootstrap
# Install PSake module if it is not already installed
if (-not (Get-Module -Name PSDepend -ListAvailable))
{
Install-Module -Name PSDepend -Scope CurrentUser -Force -Confirm:$false
}
# Install build dependencies required for Init task
Import-Module -Name PSDepend
Invoke-PSDepend `
-Path $PSScriptRoot `
-Force `
-Import `
-Install `
-Tags 'Bootstrap'
# Execute the PSake tasts from the psakefile.ps1
Invoke-Psake `
-buildFile (Join-Path -Path $PSScriptRoot -ChildPath 'psakefile.ps1') `
-nologo `
@PSBoundParameters
exit ( [int]( -not $psake.build_success ) )