Skip to content

Commit c933c7c

Browse files
committed
Use current build for psget ci
1 parent 056ac6c commit c933c7c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.ci/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
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

buildtools.psm1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)