diff --git a/scripts/ValidateProjectVersionUpdated.ps1 b/scripts/ValidateProjectVersionUpdated.ps1 index 1f4f4a83..c00447df 100644 --- a/scripts/ValidateProjectVersionUpdated.ps1 +++ b/scripts/ValidateProjectVersionUpdated.ps1 @@ -56,7 +56,7 @@ Catch { Exit 1 } -$currentPublishedVersion = [System.Management.Automation.SemanticVersion]$nugetIndex.items[0].upper +$currentPublishedVersion = $nugetIndex.items | Select-Object -ExpandProperty upper | ForEach-Object { [System.Management.Automation.SemanticVersion]$_ } | sort-object | Select-Object -Last 1 # Validate that the version number has been updated. if ($currentProjectVersion -le $currentPublishedVersion) {