From aad62d1ccd11ebb69b1035d5b95aef93d384bfd5 Mon Sep 17 00:00:00 2001 From: myarmolinsky Date: Wed, 5 Feb 2025 12:19:59 -0500 Subject: [PATCH] Drop support for OS versions <2.14.0 Change-type: major --- src/utils/config.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/utils/config.ts b/src/utils/config.ts index 28f57c52..45c5e548 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ import type * as BalenaSdk from 'balena-sdk'; -import * as semver from 'balena-semver'; import { getBalenaSdk, stripIndent } from './lazy'; export interface ImgConfig { @@ -122,16 +121,10 @@ export function generateDeviceConfig( // os.getConfig always returns a config for an app delete config.apiKey; - if (deviceApiKey == null && semver.satisfies(options.version, '<2.0.3')) { - config.apiKey = await sdk.models.application.generateApiKey( - application.id, - ); - } else { - config.deviceApiKey = - typeof deviceApiKey === 'string' && deviceApiKey - ? deviceApiKey - : await sdk.models.device.generateDeviceKey(device.uuid); - } + config.deviceApiKey = + typeof deviceApiKey === 'string' && deviceApiKey + ? deviceApiKey + : await sdk.models.device.generateDeviceKey(device.uuid); return config; })