forked from questionmark/PowerShellTemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.ps1
More file actions
18 lines (16 loc) · 722 Bytes
/
init.ps1
File metadata and controls
18 lines (16 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#.SYNOPSIS
# This script exists to help you install build-time dependencies the first time
[CmdletBinding()]
param()
$InformationPreference = "Continue"
Push-Location $PSScriptRoot
# If Invoke-Build is available, use the more complete InstallBuildDependencies
if (Get-Command Invoke-Build) {
Invoke-Build InstallBuildDependencies
} else {
# Otherwise, install it from the PSGallery
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
# In case you call this from a hosted build agent ...
$Script = Install-Script Install-RequiredModule -NoPathUpdate -Force -Passthru
& (Join-Path $Script.InstalledLocation "Install-RequiredModule.ps1") (Join-Path $PSScriptRoot "RequiredModules.psd1")
}