Merge pull request #1915 from balena-io/1914-mixed-arch-fleets

config generate, os configure: Add support for mixed arch fleets
This commit is contained in:
bulldozer-balena[bot] 2020-07-03 22:31:48 +00:00 committed by GitHub
commit 1accb885a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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