-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.ps1
29 lines (23 loc) · 881 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
26
27
28
29
[cmdletbinding()]
param(
[string[]]$Task = 'default' # This task is defined in psakeBuild. We are just setting a default here.
)
# Verify that we have PackageManagement module installed
if (!(Get-Command Install-Module)) {
throw 'PackageManagement is not installed. You need V5 or https://www.microsoft.com/en-us/download/details.aspx?id=51451'
}
# Verify that our testing utilities are installed.
if (!(Get-Module -Name Pester -ListAvailable)) {
Install-Module -Name Pester
}
if (!(Get-Module -Name psake -ListAvailable)) {
Install-Module -Name Psake
}
if (!(Get-Module -Name PSDeploy -ListAvailable)) {
Install-Module -Name PSDeploy
}
if (!(Get-Module -Name PSScriptAnalyzer -ListAvailable)) {
Install-Module -Name PSScriptAnalyzer
}
# Run our test
Invoke-psake -buildFile "$PSScriptRoot\test\psakeBuild.ps1" -taskList $Task -parameters @{"root"=$PSScriptRoot}