From 6956ad3ffe2501b55e5427e5a4481d628fd52f84 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 13 Jun 2024 14:30:35 +0300 Subject: [PATCH 1/2] Fixes release script --- scripts/ValidateProjectVersionUpdated.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ValidateProjectVersionUpdated.ps1 b/scripts/ValidateProjectVersionUpdated.ps1 index 71e4230..ba25c90 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 = [System.Management.Automation.SemanticVersion]$nugetIndex.items[$nugetIndex.items.Count - 1].upper # Validate that the version number has been updated. if ($currentProjectVersion -le $currentPublishedVersion) { From c3a0e3a42e6a17953a8fcf11209d6c11851ae267 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 13 Jun 2024 16:09:11 +0300 Subject: [PATCH 2/2] Update scripts/ValidateProjectVersionUpdated.ps1 --- scripts/ValidateProjectVersionUpdated.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ValidateProjectVersionUpdated.ps1 b/scripts/ValidateProjectVersionUpdated.ps1 index ba25c90..6825a73 100644 --- a/scripts/ValidateProjectVersionUpdated.ps1 +++ b/scripts/ValidateProjectVersionUpdated.ps1 @@ -56,7 +56,8 @@ Catch { Exit 1 } -$currentPublishedVersion = [System.Management.Automation.SemanticVersion]$nugetIndex.items[$nugetIndex.items.Count - 1].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) {