forked from microsoft/navcontainerhelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Import-BC.ps1
32 lines (28 loc) · 925 Bytes
/
Import-BC.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
32
param(
[switch] $Silent,
[switch] $ExportTelemetryFunctions,
[string[]] $bcContainerHelperConfigFile = @(),
[switch] $useVolumes
)
if (($PSVersionTable.PSVersion -lt "6.0.0") -or $isWindows) {
Get-ChildItem -Path $PSScriptRoot -Recurse | ForEach-Object { Unblock-File -Path $_.FullName }
}
$modules = @(
"BcContainerHelper"
"BC.HelperFunctions",
"BC.ArtifactsHelper",
"BC.AppSourceHelper",
"BC.ALGoHelper",
"BC.SaasHelper",
"BC.NuGetHelper",
"BC"
)
[Array]::Reverse($modules)
$modules | ForEach-Object {
Remove-Module $_ -ErrorAction SilentlyContinue
}
[Array]::Reverse($modules)
$modules | Select-Object -Skip 1 | ForEach-Object {
$modulePath = Join-Path $PSScriptRoot "$_.psd1"
Import-Module $modulePath -DisableNameChecking -ArgumentList $Silent, $ExportTelemetryFunctions, $bcContainerHelperConfigFile, $useVolumes
}