Skip to content

Commit 58722e0

Browse files
committed
Update Get-GitHubRepoRelease.ps1
Remove Platform value from output
1 parent 15ddb79 commit 58722e0

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

Evergreen/Shared/Get-GitHubRepoRelease.ps1

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,23 @@ function Get-GitHubRepoRelease {
184184
}
185185

186186
# Build the output object
187-
$PSObject = [PSCustomObject] @{
188-
Version = $Version
189-
Platform = Get-Platform -String $asset.browser_download_url
190-
Architecture = Get-Architecture -String $(Split-Path -Path $asset.browser_download_url -Leaf)
191-
Type = [System.IO.Path]::GetExtension($asset.browser_download_url).Split(".")[-1]
192-
InstallerType = Get-InstallerType -String $asset.browser_download_url
193-
Date = ConvertTo-DateTime -DateTime $item.created_at -Pattern "MM/dd/yyyy HH:mm:ss"
194-
Size = $asset.size
195-
URI = $asset.browser_download_url
196-
}
197-
Write-Verbose -Message "$($MyInvocation.MyCommand): Matching platform 'Windows' against: $($PSObject.Platform)."
198-
if ($PSObject.Platform -eq "Windows") {
187+
if ((Get-Platform -String $asset.browser_download_url) -eq "Windows") {
188+
$PSObject = [PSCustomObject] @{
189+
Version = $Version
190+
Date = ConvertTo-DateTime -DateTime $item.created_at -Pattern "MM/dd/yyyy HH:mm:ss"
191+
Size = $asset.size
192+
#Platform = Get-Platform -String $asset.browser_download_url
193+
Architecture = Get-Architecture -String $(Split-Path -Path $asset.browser_download_url -Leaf)
194+
InstallerType = Get-InstallerType -String $asset.browser_download_url
195+
Type = [System.IO.Path]::GetExtension($asset.browser_download_url).Split(".")[-1]
196+
URI = $asset.browser_download_url
197+
}
199198
Write-Output -InputObject $PSObject
200199
}
200+
# Write-Verbose -Message "$($MyInvocation.MyCommand): Matching platform 'Windows' against: $($PSObject.Platform)."
201+
# if ($PSObject.Platform -eq "Windows") {
202+
# Write-Output -InputObject $PSObject
203+
# }
201204
}
202205
else {
203206
Write-Verbose -Message "$($MyInvocation.MyCommand): Skip: $($asset.browser_download_url)."

0 commit comments

Comments
 (0)