Skip to content

Commit

Permalink
Update build_setup_dependancies.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gweinjc committed Oct 3, 2023
1 parent 2f4d32d commit 32dfcbc
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/build_setup_dependancies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,17 @@ jobs:
}
$PSDependencies = @{
'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' }
'PackageManagement' = @{Repository = 'PSGallery'; RequiredVersion = '1.4.8.1' }
'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' }
'PlatyPS' = @{Repository = 'PSGallery'; RequiredVersion = '0.14.2' }
'Pester' = @{Repository = 'PSGallery'; RequiredVersion = '5.3.3' }
'AWS.Tools.Common' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
'AWS.Tools.CodeArtifact' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' }
'PackageManagement' = @{Repository = 'PSGallery'; RequiredVersion = '1.4.8.1' }
'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' }
'PlatyPS' = @{Repository = 'PSGallery'; RequiredVersion = '0.14.2' }
'AWS.Tools.Common' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
'AWS.Tools.CodeArtifact' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
}
foreach ($RequiredModule in $PSDependencies.Keys) {
If ([System.String]::IsNullOrEmpty((Get-InstalledModule | Where-Object { $_.Name -eq $RequiredModule }))) {
Write-Host("[status]Installing module: '$RequiredModule'; version: $($PSDependencies[$RequiredModule].RequiredVersion) from $($PSDependencies[$RequiredModule].Repository)")
Install-Module -Name $RequiredModule -Repository:($($PSDependencies[$RequiredModule].Repository)) -RequiredVersion:($($PSDependencies[$RequiredModule].RequiredVersion)) -AllowPrerelease -Force
}
If ([System.String]::IsNullOrEmpty((Get-Module | Where-Object { $_.Name -eq $RequiredModule }))) {
Write-Host("[status]Importing module: '$RequiredModule'")
Import-Module -Name:($RequiredModule) -Force -Global
}
}

0 comments on commit 32dfcbc

Please sign in to comment.