File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 4848 - ${{ parameters.powershellExecutable }} : |
4949 $modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
5050 Write-Verbose -Verbose "Install Microsoft.PowerShell.PSResourceGet to temp module path"
51- Save-Module -Name Microsoft.PowerShell.PSResourceGet -Version 1.0.2 - Path $modulePath -Force -Verbose
51+ Save-Module -Name Microsoft.PowerShell.PSResourceGet -Path $modulePath -Force -Verbose
5252 Write-Verbose -Verbose "Install Pester 4.X to temp module path"
5353 Save-Module -Name "Pester" -MaximumVersion 4.99 -Path $modulePath -Force
5454 displayName: Install Microsoft.PowerShell.PSResourceGet and Pester
Original file line number Diff line number Diff line change @@ -126,7 +126,17 @@ function Install-ModulePackageForTest {
126126 Write-Verbose - Verbose - Message " PSResourceGet module base imported: $psgetModuleBase "
127127 Write-Verbose - Verbose - Message " PSResourceGet version base imported: $psgetVersion "
128128 Write-Verbose - Verbose - Message " PSResourceGet prerelease base imported: $psgetPrerelease "
129- Save-PSResource - Name $config.ModuleName - Repository $localRepoName - Path $installationPath - SkipDependencyCheck - Prerelease - Confirm:$false - TrustRepository
129+ # Save-PSResource -Name $config.ModuleName -Repository $localRepoName -Path $installationPath -SkipDependencyCheck -Prerelease -Confirm:$false -TrustRepository
130+
131+ Register-PSRepository - Name $localRepoName - SourceLocation $packagePathWithNupkg - InstallationPolicy Trusted - Verbose
132+ $psgetv2ModuleBase = (get-command save-module ).Module.ModuleBase
133+ $psgetv2Version = (get-command save-module ).Module.Version.ToString()
134+ $psgetv2Prerelease = (get-command save-module ).module.PrivateData.PSData.Prerelease
135+ Write-Verbose - Verbose - Message " PowerShellGet module base imported: $psgetv2ModuleBase "
136+ Write-Verbose - Verbose - Message " PowerShellGet version base imported: $psgetv2Version "
137+ Write-Verbose - Verbose - Message " PowerShellGet prerelease base imported: $psgetv2Prerelease "
138+ Save-Module - Name $config.ModuleName - Repository $localRepoName - Path $installationPath - Force - Verbose - AllowPrerelease - Confirm:$false
139+ Unregister-PSRepository - Name $localRepoName - Confirm:$false
130140
131141 Write-Verbose - Verbose - Message " Unregistering local package repo: $localRepoName "
132142 Unregister-PSResourceRepository - Name $localRepoName - Confirm:$false
You can’t perform that action at this time.
0 commit comments