From b281338a220ff965f2b68de3407baa5ce8e9fd3c Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Fri, 26 Jul 2024 17:51:08 +0000 Subject: [PATCH] Enhancement (generate): Remove sorting of tags for functions `Get-RepositoryRelease*` --- .../Private/Get-RepositoryReleaseLatest.ps1 | 2 +- .../Private/Get-RepositoryReleasePrevious.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleaseLatest.ps1 b/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleaseLatest.ps1 index 007bf1e..daad264 100644 --- a/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleaseLatest.ps1 +++ b/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleaseLatest.ps1 @@ -45,7 +45,7 @@ function Get-RepositoryReleaseLatest { $tagsLatestInfo | Write-Verbose $tagsLatestCommitSHA = (@($tagsLatestInfo)[0] -split "\s")[0] "Latest release commit SHA: $tagsLatestCommitSHA" | Write-Verbose - $tagsLatest = git tag --points-at $tagsLatestCommitSHA | Sort-Object -Descending | ? { $_ -match $tagPattern } # Returns an array of tags if they point to the same commit + $tagsLatest = git tag --points-at $tagsLatestCommitSHA | ? { $_ -match $tagPattern } # Returns an array of tags if they point to the same commit "Latest release tag(s):" | Write-Verbose $tagsLatest | Write-Verbose $tagsLatest diff --git a/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleasePrevious.ps1 b/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleasePrevious.ps1 index dbe5882..1124fba 100644 --- a/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleasePrevious.ps1 +++ b/src/PSRepositoryReleaseManager/Private/Get-RepositoryReleasePrevious.ps1 @@ -68,7 +68,7 @@ function Get-RepositoryReleasePrevious { (@($tagsPreviousInfo)[0] -split "\s")[0] } "Previous release commit SHA: $tagPreviousCommitSHA" | Write-Verbose - $tagsPrevious = git tag --points-at "$tagPreviousCommitSHA" | Sort-Object -Descending | ? { $_ -match $tagPattern } # Returns an array of tags if they point to the same commit + $tagsPrevious = git tag --points-at "$tagPreviousCommitSHA" | ? { $_ -match $tagPattern } # Returns an array of tags if they point to the same commit "Previous release tag(s):" | Write-Verbose $tagsPrevious | Write-Verbose $tagsPrevious