forked from jpsider/RestPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
31 lines (26 loc) · 843 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
30
31
<#
.Description
Installs and loads all the required modules for the build.
Derived from scripts written by Warren F. (RamblingCookieMonster)
#>
[cmdletbinding()]
param ($Task = 'Default')
Write-Output "Starting build"
# Grab nuget bits, install modules, set build variables, start build.
Write-Output " Install Dependent Modules"
Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null
Install-Module InvokeBuild, PSDeploy, BuildHelpers, PSScriptAnalyzer, Coveralls, PowerLumber -force -Scope CurrentUser
Install-Module Pester -RequiredVersion 4.7.3 -Force -SkipPublisherCheck -Scope CurrentUser
Write-Output " Import Dependent Modules"
Import-Module InvokeBuild, BuildHelpers, PSScriptAnalyzer
Set-BuildEnvironment
Write-Output " InvokeBuild"
Invoke-Build $Task -Result result
if ($Result.Error)
{
exit 1
}
else
{
exit 0
}