Fix New-BcContainerWizard
This commit is contained in:
Родитель
dc08d0a392
Коммит
69b675d01d
|
@ -13,7 +13,7 @@ function New-BcContainerWizard {
|
|||
|
||||
$script = Join-Path $PSScriptRoot "..\CreateScript.ps1"
|
||||
|
||||
Start-Process $pslink @($script, "-skipContainerHelperCheck")
|
||||
Start-Process $pslink @("-File ""$script""", "-skipContainerHelperCheck")
|
||||
|
||||
}
|
||||
Set-Alias -Name New-NavContainerWizard -Value New-BcContainerWizard
|
||||
|
|
|
@ -318,7 +318,7 @@ $script:wizardStep = 0
|
|||
$script:acceptDefaults = $false
|
||||
|
||||
$Step = @{
|
||||
"NavContainerHelper" = 0
|
||||
"BcContainerHelper" = 0
|
||||
"AcceptEula" = 1
|
||||
"Hosting" = 2
|
||||
"Authentication" = 3
|
||||
|
@ -349,49 +349,42 @@ $script:thisStep = $script:wizardStep
|
|||
$script:wizardStep++
|
||||
|
||||
switch ($script:thisStep) {
|
||||
$Step.NavContainerHelper {
|
||||
# _ _ _____ _ _ _ _ _
|
||||
# | \ | | / ____| | | (_) | | | | | |
|
||||
# | \| | __ ___ __ | ___ _ __ | |_ __ _ _ _ __ ___ _ __| |__| | ___| |_ __ ___ _ __
|
||||
# | . ` |/ _` \ \ / / | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__| __ |/ _ \ | '_ \ / _ \ '__|
|
||||
# | |\ | (_| |\ V /| |____ (_) | | | | |_ (_| | | | | | __/ | | | | | __/ | |_) | __/ |
|
||||
# |_| \_|\__,_| \_/ \_____\___/|_| |_|\__\__,_|_|_| |_|\___|_| |_| |_|\___|_| .__/ \___|_|
|
||||
# | |
|
||||
#
|
||||
$Step.BcContainerHelper {
|
||||
# ____ _____ _ _ _ _ _
|
||||
# | _ \ / ____| | | (_) | | | | | |
|
||||
# | |_) | ___| | ___ _ __ | |_ __ _ _ _ __ ___ _ __| |__| | ___| |_ __ ___ _ __
|
||||
# | _ < / __| | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__| __ |/ _ \ | '_ \ / _ \ '__|
|
||||
# | |_) | (__| |____ (_) | | | | |_ (_| | | | | | __/ | | | | | __/ | |_) | __/ |
|
||||
# |____/ \___|\_____\___/|_| |_|\__\__,_|_|_| |_|\___|_| |_| |_|\___|_| .__/ \___|_|
|
||||
# | |
|
||||
# |_|
|
||||
if (!$skipContainerHelperCheck) {
|
||||
$module = Get-InstalledModule -Name "NavContainerHelper" -ErrorAction SilentlyContinue
|
||||
$module = Get-InstalledModule -Name "BcContainerHelper" -ErrorAction SilentlyContinue
|
||||
if (!($module)) {
|
||||
$module = Get-Module -Name "NavContainerHelper" -ErrorAction SilentlyContinue
|
||||
$module = Get-Module -Name "BcContainerHelper" -ErrorAction SilentlyContinue
|
||||
}
|
||||
if (!($module)) {
|
||||
Write-Host -ForegroundColor Red "This script has a dependency on the PowerShell module NavContainerHelper."
|
||||
Write-Host -ForegroundColor Red "See more here: https://www.powershellgallery.com/packages/navcontainerhelper"
|
||||
Write-Host -ForegroundColor Red "Use 'Install-Module NavContainerHelper -force' to install in PowerShell"
|
||||
Write-Host -ForegroundColor Red "This script has a dependency on the PowerShell module BcContainerHelper."
|
||||
Write-Host -ForegroundColor Red "See more here: https://www.powershellgallery.com/packages/bccontainerhelper"
|
||||
Write-Host -ForegroundColor Red "Use 'Install-Module BcContainerHelper -force' to install in PowerShell"
|
||||
return
|
||||
}
|
||||
elseif ($module.Version -eq [Version]"0.0") {
|
||||
$function = $module.ExportedFunctions.GetEnumerator() | Where-Object { $_.Key -eq "Get-BcArtifactUrl" }
|
||||
if (!($function)) {
|
||||
Write-Host -ForegroundColor Red "Your version of the NavContainerHelper PowerShell module is not up-to-date."
|
||||
Write-Host -ForegroundColor Red "Please pull a new version of the sources or install the module using: Install-Module NavContainerHelper -force"
|
||||
return
|
||||
}
|
||||
Write-Host -ForegroundColor Green "Running a cloned version of NavContainerHelper, which seems to be OK"
|
||||
Write-Host
|
||||
}
|
||||
elseif ($module.Version -lt [Version]"0.7.0.9") {
|
||||
Write-Host -ForegroundColor Red "Your version of the NavContainerHelper PowerShell module is not up-to-date."
|
||||
Write-Host -ForegroundColor Red "Please update the module using: Update-Module NavContainerHelper -force"
|
||||
return
|
||||
}
|
||||
else {
|
||||
$latestVersion = (Find-Module -Name navcontainerhelper).Version
|
||||
$myVersion = $module.Version.ToString()
|
||||
if ($latestVersion -eq $myVersion) {
|
||||
Write-Host -ForegroundColor Green "You are running NavContainerHelper $myVersion (which is the latest version)"
|
||||
$prerelease = $myVersion.Contains("-preview")
|
||||
if ($prerelease) {
|
||||
$latestVersion = (Find-Module -Name bccontainerhelper -AllowPrerelease).Version
|
||||
$previewStr = "Prerelease version "
|
||||
}
|
||||
else {
|
||||
Write-Host -ForegroundColor Yellow "You are running NavContainerHelper $myVersion. A newer version ($latestVersion) exists, please consider updating."
|
||||
$latestVersion = (Find-Module -Name bccontainerhelper).Version
|
||||
$previewStr = ""
|
||||
}
|
||||
if ($latestVersion -eq $myVersion) {
|
||||
Write-Host -ForegroundColor Green "You are running BcContainerHelper $previewStr$myVersion (which is the latest version)"
|
||||
}
|
||||
else {
|
||||
Write-Host -ForegroundColor Yellow "You are running BcContainerHelper $previewStr$myVersion. A newer version ($latestVersion) exists, please consider updating."
|
||||
}
|
||||
Write-Host
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
Copy-FileToBcContainer and Copy-FileFromBcContainer didn't support that hostHelperFolder and containerHelperFolder was different
|
||||
Get-TestsFromBcContainer and Run-TestsInBcContainer didn't support that hostHelperFolder and containerHelperFolder was different
|
||||
Issue #1174 do not use hyperv isolation if Hyper-V isn't installed
|
||||
Issue #1180 New-BcContainerWizard doesn't work (if BcContainerHelper is installed in standard path)
|
||||
Change NavContainerhelper to BcContainerHelper in New-BcContainerWizard
|
||||
|
||||
1.0.0
|
||||
Change module name to BcContainerHelper
|
||||
|
|
Загрузка…
Ссылка в новой задаче