-
Notifications
You must be signed in to change notification settings - Fork 234
/
Copy pathazurePipelinesBuild.ps1
23 lines (18 loc) · 1.07 KB
/
azurePipelinesBuild.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
$ErrorActionPreference = 'Stop'
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null
if ($IsWindows -or $PSVersionTable.PSVersion.Major -lt 6) {
# We rely on PowerShellGet's -AllowPrerelease which is in PowerShellGet 1.6 so we need to update PowerShellGet.
Get-Module PowerShellGet,PackageManagement | Remove-Module -Force
powershell -Command { Install-Module -Name PowerShellGet -MinimumVersion 1.6 -Force }
powershell -Command { Install-Module -Name PackageManagement -MinimumVersion 1.1.7.0 -Force }
Import-Module -Name PowerShellGet -MinimumVersion 1.6 -Force
Import-Module -Name PackageManagement -MinimumVersion 1.1.7.0 -Force
}
# Update help needed for SignatureHelp LSP request.
Update-Help -Force -ErrorAction SilentlyContinue
# Needed for build and docs gen.
Install-Module -Name InvokeBuild -RequiredVersion 5.9.7 -Scope CurrentUser -Force
Install-Module -Name platyPS -RequiredVersion 0.14.2 -Scope CurrentUser -Force
Invoke-Build -Configuration Release Build