-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
psakeFile.ps1
22 lines (19 loc) · 927 Bytes
/
psakeFile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
properties {
# Build settings
$PSBPreference.Build.CompileModule = $true
# $PSBPreference.Build.CopyDirectories = @('Data')
$PSBPreference.Build.CompileHeader = @'
using namespace System.Management.Automation
using namespace System.Collections.ObjectModel
'@
# Test settings
$PSBPreference.Test.ImportModule = $true
$PSBPreference.Test.OutputFile = [IO.Path]::Combine($PSBPreference.Build.OutDir, 'testResults.xml')
$PSBPreference.Test.ScriptAnalysis.SettingsPath = [IO.Path]::Combine($PSBPreference.Test.RootDir, 'ScriptAnalyzerSettings.psd1')
if ($galleryApiKey) {
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
}
}
task default -depends Test
# task Build -FromModule PowerShellBuild -Version '0.6.1' -depends @('StageFiles')
task Pester -FromModule PowerShellBuild -Version '0.6.1' -preaction { Remove-Module alias-tips -ErrorAction SilentlyContinue }