@@ -184,20 +184,23 @@ function Get-GitHubRepoRelease {
184
184
}
185
185
186
186
# 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
+ }
199
198
Write-Output - InputObject $PSObject
200
199
}
200
+ # Write-Verbose -Message "$($MyInvocation.MyCommand): Matching platform 'Windows' against: $($PSObject.Platform)."
201
+ # if ($PSObject.Platform -eq "Windows") {
202
+ # Write-Output -InputObject $PSObject
203
+ # }
201
204
}
202
205
else {
203
206
Write-Verbose - Message " $ ( $MyInvocation.MyCommand ) : Skip: $ ( $asset.browser_download_url ) ."
0 commit comments