Skip to content

Commit

Permalink
Update Get-GitForWindows.ps1
Browse files Browse the repository at this point in the history
Address #794
  • Loading branch information
aaronparker committed Feb 22, 2025
1 parent e5b1dd3 commit 4f593a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Evergreen/Apps/Get-GitForWindows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ function Get-GitForWindows {
}
$object = Get-GitHubRepoRelease @params
Write-Output -InputObject $object

# Check the version string and remove the revision number if it is 1
$SystemVersion = [System.Version]$object[0].Version
if ($SystemVersion.Revision -eq 1) {
$object = $object | ForEach-Object { $_.Version = ($SystemVersion.Major, $SystemVersion.Minor, $SystemVersion.Build -join "."); $_ }
Write-Output -InputObject $object
}
else {
Write-Output -InputObject $object
}
}

0 comments on commit 4f593a1

Please sign in to comment.