config generate, os configure: Add support for mixed arch fleets

Resolves: #1914
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
This commit is contained in:
Thodoris Greasidis 2020-07-03 18:40:12 +03:00 committed by Balena CI
parent 95f9443c2a
commit 497023965f

View File

@ -132,11 +132,13 @@ export async function getManifest(
}
export const areDeviceTypesCompatible = (
deviceTypeA: BalenaSdk.DeviceType,
deviceTypeB: BalenaSdk.DeviceType,
appDeviceType: BalenaSdk.DeviceType,
osDeviceType: BalenaSdk.DeviceType,
) =>
deviceTypeA.arch === deviceTypeB.arch &&
!!deviceTypeA.isDependent === !!deviceTypeB.isDependent;
getBalenaSdk().models.os.isArchitectureCompatibleWith(
osDeviceType.arch,
appDeviceType.arch,
) && !!appDeviceType.isDependent === !!osDeviceType.isDependent;
export async function osProgressHandler(step: InitializeEmitter) {
step.on('stdout', process.stdout.write.bind(process.stdout));