Skip to content

Commit 915ea5c

Browse files
authored
⬆️ Pin Pester dependency (#392)
1 parent cb88b3b commit 915ea5c

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

PSKoans/PSKoans.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
# Modules that must be imported into the global environment prior to importing this module
5454
RequiredModules = @(
5555
@{
56-
ModuleName = 'Pester'
57-
ModuleVersion = '4.3.1'
56+
ModuleName = 'Pester'
57+
RequiredVersion = '4.10.1'
5858
}
5959
)
6060

templates/environment-setup.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ steps:
1717
1818
$Params.Name = 'Pester'
1919
$Params.SkipPublisherCheck = $true
20+
$Params.MaximumVersion = '4.99.99'
2021
$Params | Out-String | Write-Host
2122
Install-Module @Params
2223
$Params.Remove('SkipPublisherCheck')
24+
$Params.Remove('MaximumVersion')
2325
2426
$Params.Name = 'EZOut'
2527
$Params.AllowClobber = $true

templates/install-built-module.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ steps:
2626
inputs:
2727
targetType: 'inline'
2828
script: |
29+
$pesterParams = @{
30+
Name = 'Pester'
31+
MaximumVersion = '4.99.99'
32+
ProviderName = 'NuGet'
33+
Path = '${{ parameters.repositoryPath }}'
34+
Force = $true
35+
Source = 'PSGallery'
36+
}
37+
2938
Register-PackageSource -Name PSGallery -ProviderName NuGet -Location https://www.powershellgallery.com/api/v2 -Force
30-
Save-Package -Name Pester -ProviderName NuGet -Path ${{ parameters.repositoryPath }} -Force -Source PSGallery |
31-
Select-Object -Property Name, Version, Status, Source
39+
Save-Package @pesterParams | Select-Object -Property Name, Version, Status, Source
3240
Install-Module PSKoans -Repository ${{ parameters.repositoryName }} -Force -Scope CurrentUser
3341
3442
errorActionPreference: 'stop'

0 commit comments

Comments
 (0)