chore: do not fall back to previous LTS release deps for new Ubuntu LTS (#34360)

This commit is contained in:
Yury Semikhatsky 2025-01-16 15:20:40 -08:00 committed by GitHub
parent 587e778a5a
commit 5438814975
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 8 deletions

View file

@ -95,7 +95,7 @@ export async function installDependenciesLinux(targets: Set<DependencyGroup>, dr
for (const target of targets) { for (const target of targets) {
const info = deps[platform]; const info = deps[platform];
if (!info) { if (!info) {
console.warn(`Cannot install dependencies for ${platform}!`); // eslint-disable-line no-console console.warn(`Cannot install dependencies for ${platform} with Playwright ${getPlaywrightVersion()}!`); // eslint-disable-line no-console
return; return;
} }
libraries.push(...info[target]); libraries.push(...info[target]);

View file

@ -74,14 +74,18 @@ function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupporte
// KDE Neon is ubuntu-based and has the same versions. // KDE Neon is ubuntu-based and has the same versions.
// TUXEDO OS is ubuntu-based and has the same versions. // TUXEDO OS is ubuntu-based and has the same versions.
if (distroInfo?.id === 'ubuntu' || distroInfo?.id === 'pop' || distroInfo?.id === 'neon' || distroInfo?.id === 'tuxedo') { if (distroInfo?.id === 'ubuntu' || distroInfo?.id === 'pop' || distroInfo?.id === 'neon' || distroInfo?.id === 'tuxedo') {
const isOfficiallySupportedPlatform = distroInfo?.id === 'ubuntu'; const isUbuntu = distroInfo?.id === 'ubuntu';
if (parseInt(distroInfo.version, 10) <= 19) const version = distroInfo?.version;
const major = parseInt(distroInfo.version, 10);
if (major < 20)
return { hostPlatform: ('ubuntu18.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false }; return { hostPlatform: ('ubuntu18.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false };
if (parseInt(distroInfo.version, 10) <= 21) if (major < 22)
return { hostPlatform: ('ubuntu20.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform }; return { hostPlatform: ('ubuntu20.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: isUbuntu && version === '20.04' };
if (parseInt(distroInfo.version, 10) <= 22) if (major < 24)
return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform }; return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: isUbuntu && version === '22.04' };
return { hostPlatform: ('ubuntu24.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform }; if (major < 26)
return { hostPlatform: ('ubuntu24.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: isUbuntu && version === '24.04' };
return { hostPlatform: ('ubuntu' + distroInfo.version + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false };
} }
// Linux Mint is ubuntu-based but does not have the same versions // Linux Mint is ubuntu-based but does not have the same versions
if (distroInfo?.id === 'linuxmint') { if (distroInfo?.id === 'linuxmint') {