From f9e341abe654b02cdd97eb2fd11d188a69b65d91 Mon Sep 17 00:00:00 2001 From: Maurice Kevenaar Date: Sun, 5 Jan 2025 20:26:52 +0100 Subject: [PATCH] (firefox) fix update script --- automatic/firefox/update.ps1 | 7 ++++--- automatic/firefox/update_helper.ps1 | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/automatic/firefox/update.ps1 b/automatic/firefox/update.ps1 index 89705e7aa2..465e533564 100644 --- a/automatic/firefox/update.ps1 +++ b/automatic/firefox/update.ps1 @@ -3,8 +3,8 @@ param($IncludeStream, [switch] $Force) Import-Module Chocolatey-AU . "$PSScriptRoot\update_helper.ps1" -$releasesBETA = 'https://www.mozilla.org/en-US/firefox/beta/all/' -$releasesDEV = 'https://www.mozilla.org/en-US/firefox/developer/all/' +$releasesBETA = 'https://www.mozilla.org/en-US/firefox/all/desktop-beta/win/en-US/' +$releasesDEV = 'https://www.mozilla.org/en-US/firefox/all/desktop-developer/win/en-US/' $product = 'firefox' function global:au_BeforeUpdate { @@ -18,6 +18,7 @@ function global:au_AfterUpdate { -Product $product ` -ExtendedRelease:$($Latest.PackageName -eq 'FirefoxESR') ` -DevelopmentRelease:$($Latest.PackageName -eq 'firefox-dev') ` + } function global:au_SearchReplace { @@ -28,7 +29,7 @@ function global:au_SearchReplace { function global:au_GetLatest { $streams = @{} - + $data = GetVersionAndUrlFormats -UpdateUrl $releasesBETA -Product "${product}-beta" $version = $data.Version $betaversion = $version -replace "b", "." diff --git a/automatic/firefox/update_helper.ps1 b/automatic/firefox/update_helper.ps1 index bf76803de9..ad01358539 100644 --- a/automatic/firefox/update_helper.ps1 +++ b/automatic/firefox/update_helper.ps1 @@ -9,6 +9,7 @@ function GetVersionAndUrlFormats() { ) $download_page = Invoke-WebRequest -UseBasicParsing -Uri $UpdateUrl + $re = "download.mozilla.*product=$Product.*(&|&)os=win(&|&)lang=en-US" $url = $download_page.links | Where-Object href -match $re | Select-Object -first 1 -expand href $url = Get-RedirectedUrl $url