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 48
48
- ${{ parameters.powershellExecutable }} : |
49
49
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
50
50
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
52
52
Write-Verbose -Verbose "Install Pester 4.X to temp module path"
53
53
Save-Module -Name "Pester" -MaximumVersion 4.99 -Path $modulePath -Force
54
54
displayName: Install Microsoft.PowerShell.PSResourceGet and Pester
Original file line number Diff line number Diff line change @@ -126,7 +126,17 @@ function Install-ModulePackageForTest {
126
126
Write-Verbose - Verbose - Message " PSResourceGet module base imported: $psgetModuleBase "
127
127
Write-Verbose - Verbose - Message " PSResourceGet version base imported: $psgetVersion "
128
128
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
130
140
131
141
Write-Verbose - Verbose - Message " Unregistering local package repo: $localRepoName "
132
142
Unregister-PSResourceRepository - Name $localRepoName - Confirm:$false
You can’t perform that action at this time.
0 commit comments