Skip to content

Commit

Permalink
Merge pull request #66 from theohbrothers/fix/release-fix-function-ge…
Browse files Browse the repository at this point in the history
…t-repositoryreleaselatest-to-correctly-return-the-latest-tag-if-it-is-the-only-tag

Fix (release): Fix function `Get-RepositoryReleaseLatest` to correctly return the latest tag if it is the only tag
  • Loading branch information
joeltimothyoh authored May 20, 2024
2 parents eb28e84 + 39250a3 commit eac4e15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Get-RepositoryReleaseLatest {
"Release tags info:" | Write-Verbose
$releaseTagsInfo | Write-Verbose
"Retrieving latest release tag(s)" | Write-Verbose
$releaseLatestCommitSHA = ($releaseTagsInfo[0] -split "\s")[0]
$releaseLatestCommitSHA = (@($releaseTagsInfo)[0] -split "\s")[0]
git tag --points-at $releaseLatestCommitSHA | Sort-Object -Descending # Returns an array of tags if they point to the same commit
}catch {
Write-Error -Exception $_.Exception -Message $_.Exception.Message -Category $_.CategoryInfo.Category -TargetObject $_.TargetObject
Expand Down

0 comments on commit eac4e15

Please sign in to comment.