From 3efdb9366a85e2555a02cbb85efd12538a2547c7 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Tue, 19 Sep 2023 21:50:50 +1000 Subject: [PATCH] #550 --- Evergreen/Apps/Get-GoogleChrome.ps1 | 45 +++++++++------------------ Evergreen/Manifests/GoogleChrome.json | 15 ++++----- docs/changelog.md | 1 + 3 files changed, 21 insertions(+), 40 deletions(-) diff --git a/Evergreen/Apps/Get-GoogleChrome.ps1 b/Evergreen/Apps/Get-GoogleChrome.ps1 index 4b1f5762..6919322f 100644 --- a/Evergreen/Apps/Get-GoogleChrome.ps1 +++ b/Evergreen/Apps/Get-GoogleChrome.ps1 @@ -34,7 +34,8 @@ function Get-GoogleChrome { } Write-Output -InputObject $PSObject - if ($Channel -eq "stable") { + if ($Channel -eq $res.Get.Download.BundleFilter) { + # Output the version and URI for the bundle download $PSObject = [PSCustomObject] @{ Version = $Version Architecture = Get-Architecture -String $res.Get.Download.Bundle @@ -44,35 +45,17 @@ function Get-GoogleChrome { } Write-Output -InputObject $PSObject } - } - - # Read the JSON and convert to a PowerShell object. Return the current release version of Chrome - # $UpdateFeed = Invoke-RestMethodWrapper -Uri $res.Get.Update.Uri - - # # Read the JSON and build an array of platform, channel, version - # foreach ($channel in $res.Get.Download.Uri.GetEnumerator()) { - # Write-Verbose -Message "$($MyInvocation.MyCommand): Channel: $($channel.Name)." - # # Step through each platform property - # foreach ($platform in $res.Get.Download.Platforms) { - # Write-Verbose -Message "$($MyInvocation.MyCommand): Platform: $platform." - - # # Filter the feed for the specific channel and platform - # $UpdateItem = $UpdateFeed.versions | Where-Object { ($_.channel -eq $channel.Name) -and ($_.os -eq $platform) } - # foreach ($item in $UpdateItem) { - - # # Output the version and URI object - # Write-Verbose -Message "$($MyInvocation.MyCommand): Found $($item.Count) item/s for $($channel.Name), $platform." - # $PSObject = [PSCustomObject] @{ - # Version = $item.Version - # Architecture = Get-Architecture -String $item.Os - # Channel = $item.Channel - # Date = ConvertTo-DateTime -DateTime $item.Current_RelDate.Trim() -Pattern $res.Get.Download.DatePattern - # Type = [System.IO.Path]::GetExtension($($res.Get.Download.Uri[$channel.Key].($Platform))).Split(".")[-1] - # URI = $($res.Get.Download.Uri[$channel.Key].($Platform)) - # } - # Write-Output -InputObject $PSObject - # } - # } - # } + if ($Channel -match $res.Get.Download.'32bitFilter') { + # Output the version and URI object for the 32-bit version + $PSObject = [PSCustomObject] @{ + Version = $Version + Architecture = Get-Architecture -String $($res.Get.Download.Uri.$Channel -replace "64", "") + Channel = $Channel + Type = Get-FileType -File $res.Get.Download.Uri.$Channel + URI = $res.Get.Download.Uri.$Channel -replace "64", "" + } + Write-Output -InputObject $PSObject + } + } } diff --git a/Evergreen/Manifests/GoogleChrome.json b/Evergreen/Manifests/GoogleChrome.json index 213f970d..38d22144 100644 --- a/Evergreen/Manifests/GoogleChrome.json +++ b/Evergreen/Manifests/GoogleChrome.json @@ -1,10 +1,10 @@ { - "Name": "Google Chrome", + "Name": "Google Chrome Enterprise", "Source": "https://cloud.google.com/chrome-enterprise/browser/download/", "Get": { "Update": { - "Uri2": "https://chromiumdash.appspot.com/fetch_releases?channel=#channel&platform=Windows", "Uri": "https://versionhistory.googleapis.com/v1/chrome/platforms/win64/channels/#channel/versions/all/releases", + "Uri2": "https://chromiumdash.appspot.com/fetch_releases?channel=#channel&platform=Windows", "Channels": [ "extended", "stable", @@ -21,13 +21,10 @@ "dev": "https://dl.google.com/dl/chrome/install/dev/googlechromedevstandaloneenterprise64.msi", "canary": "https://dl.google.com/update2/installers/ChromeSetup.exe" }, - "Bundle": "https://dl.google.com/dl/chrome/install/GoogleChromeEnterpriseBundle64.zip" - }, - "Platforms": [ - "win64", - "win" - ], - "DatePattern": "MM/dd/yy" + "Bundle": "https://dl.google.com/dl/chrome/install/GoogleChromeEnterpriseBundle64.zip", + "BundleFilter": "stable", + "32bitFilter": "stable|beta|extended|dev" + } }, "Install": { "Setup": "googlechrome*standaloneenterprise*.msi", diff --git a/docs/changelog.md b/docs/changelog.md index 2e7bd80c..447c7092 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -3,6 +3,7 @@ ## VERSION * Adds `OracleJava20`, `OracleJava17` [#381](https://github.com/aaronparker/evergreen/issues/381) +* Updates `GoogleChrome` to address missing `x86` installers [#550](https://github.com/aaronparker/evergreen/issues/550) ## 2309.850