Skip to content

Commit d20a46e

Browse files
authored
Roll chrome to 132 (#2871)
* Roll chrome to 132 * Fix firefox download * Fix xz process
1 parent 1459dbe commit d20a46e

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

lib/PuppeteerSharp/BrowserData/Chrome.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class Chrome
1313
/// <summary>
1414
/// Default chrome build.
1515
/// </summary>
16-
public static string DefaultBuildId => "130.0.6723.69";
16+
public static string DefaultBuildId => "132.0.6834.83";
1717

1818
internal static async Task<string> ResolveBuildIdAsync(ChromeReleaseChannel channel)
1919
=> (await GetLastKnownGoodReleaseForChannel(channel).ConfigureAwait(false)).Version;

lib/PuppeteerSharp/BrowserData/Firefox.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.IO;
45
using System.Linq;
56
using System.Text.Json;
@@ -181,12 +182,18 @@ private static string GetFirefoxPlatform(Platform platform)
181182
private static string GetArchiveNightly(Platform platform, string buildId)
182183
=> platform switch
183184
{
184-
Platform.Linux => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}-x86_64.tar.bz2",
185+
Platform.Linux => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}-x86_64.tar.{GetFormat(buildId)}",
185186
Platform.MacOS or Platform.MacOSArm64 => $"firefox-{buildId}.en-US.mac.dmg",
186187
Platform.Win32 or Platform.Win64 => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}.zip",
187188
_ => throw new PuppeteerException($"Unknown platform: {platform}"),
188189
};
189190

191+
private static string GetFormat(string buildId)
192+
{
193+
var majorVersion = int.Parse(buildId.Split('.')[0], CultureInfo.CurrentCulture);
194+
return majorVersion >= 135 ? "xz" : "bz2";
195+
}
196+
190197
private static string GetArchive(Platform platform, string buildId)
191198
=> platform switch
192199
{

lib/PuppeteerSharp/BrowserFetcher.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ internal static string GetBrowsersLocation()
209209

210210
private static void ExtractTar(string zipPath, string folderPath)
211211
{
212+
var compression = zipPath.EndsWith("xz", StringComparison.InvariantCulture) ? "J" : "j";
212213
new DirectoryInfo(folderPath).Create();
213214
using var process = new Process();
214215
process.StartInfo.FileName = "tar";
215-
process.StartInfo.Arguments = $"-xvjf \"{zipPath}\" -C \"{folderPath}\"";
216+
process.StartInfo.Arguments = $"-xv{compression}f \"{zipPath}\" -C \"{folderPath}\"";
216217
process.StartInfo.RedirectStandardOutput = true;
217218
process.StartInfo.UseShellExecute = false;
218219
process.Start();
@@ -433,7 +434,7 @@ private async Task UnpackArchiveAsync(string archivePath, string outputPath, str
433434
{
434435
ExecuteSetup(archivePath, outputPath);
435436
}
436-
else if (archivePath.EndsWith(".tar.bz2", StringComparison.OrdinalIgnoreCase))
437+
else if (archivePath.Contains(".tar."))
437438
{
438439
ExtractTar(archivePath, outputPath);
439440
}

lib/PuppeteerSharp/PuppeteerSharp.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<Description>Headless Browser .NET API</Description>
1313
<PackageId>PuppeteerSharp</PackageId>
1414
<PackageReleaseNotes></PackageReleaseNotes>
15-
<PackageVersion>20.0.5</PackageVersion>
16-
<ReleaseVersion>20.0.5</ReleaseVersion>
17-
<AssemblyVersion>20.0.5</AssemblyVersion>
18-
<FileVersion>20.0.5</FileVersion>
15+
<PackageVersion>20.1.0</PackageVersion>
16+
<ReleaseVersion>20.1.0</ReleaseVersion>
17+
<AssemblyVersion>20.1.0</AssemblyVersion>
18+
<FileVersion>20.1.0</FileVersion>
1919
<SynchReleaseVersion>false</SynchReleaseVersion>
2020
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
2121
<DebugType>embedded</DebugType>

0 commit comments

Comments
 (0)