@@ -74,14 +74,18 @@ function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupporte
74
74
// KDE Neon is ubuntu-based and has the same versions.
75
75
// TUXEDO OS is ubuntu-based and has the same versions.
76
76
if ( distroInfo ?. id === 'ubuntu' || distroInfo ?. id === 'pop' || distroInfo ?. id === 'neon' || distroInfo ?. id === 'tuxedo' ) {
77
- const isOfficiallySupportedPlatform = distroInfo ?. id === 'ubuntu' ;
78
- if ( parseInt ( distroInfo . version , 10 ) <= 19 )
77
+ const isUbuntu = distroInfo ?. id === 'ubuntu' ;
78
+ const version = distroInfo ?. version ;
79
+ const major = parseInt ( distroInfo . version , 10 ) ;
80
+ if ( major < 20 )
79
81
return { hostPlatform : ( 'ubuntu18.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform : false } ;
80
- if ( parseInt ( distroInfo . version , 10 ) <= 21 )
81
- return { hostPlatform : ( 'ubuntu20.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform } ;
82
- if ( parseInt ( distroInfo . version , 10 ) <= 22 )
83
- return { hostPlatform : ( 'ubuntu22.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform } ;
84
- return { hostPlatform : ( 'ubuntu24.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform } ;
82
+ if ( major < 22 )
83
+ return { hostPlatform : ( 'ubuntu20.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform : isUbuntu && version === '20.04' } ;
84
+ if ( major < 24 )
85
+ return { hostPlatform : ( 'ubuntu22.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform : isUbuntu && version === '22.04' } ;
86
+ if ( major < 26 )
87
+ return { hostPlatform : ( 'ubuntu24.04' + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform : isUbuntu && version === '24.04' } ;
88
+ return { hostPlatform : ( 'ubuntu' + distroInfo . version + archSuffix ) as HostPlatform , isOfficiallySupportedPlatform : false } ;
85
89
}
86
90
// Linux Mint is ubuntu-based but does not have the same versions
87
91
if ( distroInfo ?. id === 'linuxmint' ) {
0 commit comments