[Ubuntu, Windows] Add Azure modules to PS scope; deprecate zip (#13482)

This commit is contained in:
Erik Bershel
2026-01-09 11:03:49 +01:00
committed by GitHub
parent d9f2f12ea8
commit dce2b21f0a
9 changed files with 7 additions and 60 deletions

View File

@@ -26,20 +26,6 @@ foreach ($module in $modules) {
$psModuleMachinePath += "$modulePath;"
Save-Module -Path $modulePath -Name $moduleName -RequiredVersion $version -Force -ErrorAction Stop
}
foreach ($version in $module.zip_versions) {
$modulePath = Join-Path -Path $installPSModulePath -ChildPath "${moduleName}_${version}"
Save-Module -Path $modulePath -Name $moduleName -RequiredVersion $version -Force -ErrorAction Stop
Compress-Archive -Path $modulePath -DestinationPath "${modulePath}.zip"
Remove-Item $modulePath -Recurse -Force
}
# Append default tool version to machine path
if ($null -ne $module.default) {
$defaultVersion = $module.default
Write-Host "Use ${moduleName} ${defaultVersion} as default version..."
$psModuleMachinePath += "${installPSModulePath}\${moduleName}_${defaultVersion};"
}
}
# Add modules to the PSModulePath