This commit is contained in:
Karlie-777 2024-09-10 17:57:07 -07:00 коммит произвёл GitHub
Родитель 5363b35a37
Коммит 1526f7939e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 28 добавлений и 5 удалений

Просмотреть файл

@ -61,6 +61,13 @@ Function Get-AllVersionFiles(
Get-VersionFiles $files "$storagePath" "ai.config." $null
}
Function Get-AllTestVersionFiles(
[system.collections.generic.dictionary[string, system.collections.generic.list[hashtable]]] $files,
[string] $storagePath
) {
Get-VersionFiles $files "$storagePath" "ai_test.config." $null
}
$Error.Clear()
#-----------------------------------------------------------------------------
@ -96,15 +103,20 @@ if ([string]::IsNullOrWhiteSpace($container) -eq $true) {
Get-AllVersionFiles $files "scripts/b"
Get-AllVersionFiles $files "beta"
Get-AllVersionFiles $files "next"
Get-AllVersionFiles $files "dev"
Get-AllVersionFiles $files "nightly"
#Get-AllVersionFiles $files "dev"
Get-AllTestVersionFiles $files "dev"
# Get-AllVersionFiles $files "nightly"
Get-AllTestVersionFiles $files "nightly"
}
if ([string]::IsNullOrWhiteSpace($container) -ne $true) {
if ($container -eq "public") {
Get-AllVersionFiles $files "scripts/b"
} elseif ($container -eq "beta" -or $container -eq "next" -or $container -eq "dev" -or $container -eq "nightly") {
} elseif ($container -eq "beta" -or $container -eq "next") {
Get-AllVersionFiles $files "$container"
} elseif ($container -eq "dev" -or $container -eq "nightly") {
# Get-AllVersionFiles $files "$container"
Get-AllTestVersionFiles $files "$container"
} else {
$global:connectDetails.testOnly = $true
$global:connectDetails.storeContainer = "tst"

Просмотреть файл

@ -135,6 +135,7 @@ Write-Log "=====================================================================
# List the files for each container
$files = New-Object 'system.collections.generic.dictionary[string, system.collections.generic.list[hashtable]]'
$testFiles = New-Object 'system.collections.generic.dictionary[string, system.collections.generic.list[hashtable]]'
$storePath = "$container"
if ($container -eq "public") {
@ -145,8 +146,13 @@ if ($container -eq "public") {
}
Get-VersionFiles $files $storePath "ai.config." $activeVersion
Get-VersionFiles $testFiles $storePath "ai_test.config." $activeVersion
if ($files.ContainsKey($activeVersion) -ne $true) {
if ($container -eq "dev" -or $container -eq "nightly") {
if ($testFiles.ContainsKey($activeVersion) -ne $true) {
Write-LogFailure "Test Version [$activeVersion] does not appear to be deployed to [$container]"
}
} elseif ($files.ContainsKey($activeVersion) -ne $true) {
Write-LogFailure "Version [$activeVersion] does not appear to be deployed to [$container]"
} elseif ($files[$activeVersion].Count -ne 1) { # Since 2.6.5
Write-LogFailure "Version [$activeVersion] does not fully deployed to [$container] -- only found [$($files[$activeVersion].Count)] file(s)"
@ -157,6 +163,11 @@ if (Get-HasErrors -eq $true) {
exit 2
}
SetActiveVersion $files[$activeVersion] $storePath $minorOnly
if ($container -eq "dev" -or $container -eq "nightly") {
SetActiveVersion $testFiles[$activeVersion] $storePath $minorOnly
} else {
SetActiveVersion $files[$activeVersion] $storePath $minorOnly
}
Write-Log "======================================================================"