CreateImageWizard: default to major releases on prem
In RHEL, VERSION_ID actually refers to the minor release. Let's strip the minor component from it until we actually support those explicitly.
This commit is contained in:
parent
3eda8e2dd1
commit
76f86c3711
1 changed files with 6 additions and 1 deletions
|
|
@ -5,7 +5,12 @@ import { Distributions } from '../../../store/imageBuilderApi';
|
|||
|
||||
export const getHostDistro = async () => {
|
||||
const osRel = await read_os_release();
|
||||
return `${osRel.ID}-${osRel.VERSION_ID}` as Distributions;
|
||||
let distro = `${osRel.ID}-${osRel.VERSION_ID}`;
|
||||
// use major releases, and rely on composer's distro aliasing (rhel)
|
||||
if (distro.indexOf('.') !== -1) {
|
||||
distro = distro.split('.')[0];
|
||||
}
|
||||
return distro as Distributions;
|
||||
};
|
||||
|
||||
type Architecture = 'x86_64' | 'aarch64';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue