Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefajers authored Mar 20, 2024
1 parent 3bab831 commit bd6962c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/UpdateRequiredModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ $existingmodule = @()
$newmodule = @()
$updated = $false
$data.RequiredModules | ForEach-Object {
$moduleVersion = $_.RequiredVersion
[int]$moduleVersionInt = $moduleVersion.Replace('.',',')
$galleryVersion = (Find-Module -Name $_.ModuleName).Version
[int]$galleryVersionInt = $galleryVersion.Replace('.',',')
if ($moduleVersionInt -lt $galleryVersionInt) {
$moduleVersion = New-Object System.Version($_.RequiredVersion)
$galleryVersion = New-Object System.Version((Find-Module -Name $_.ModuleName).Version)
if ($moduleVersion -lt $galleryVersion) {
$newmodule = @{
"ModuleName" = $_.ModuleName
"RequiredVersion" = $galleryVersion
Expand Down

0 comments on commit bd6962c

Please sign in to comment.