Skip to content

Commit

Permalink
Allow fleet name aside from fleet slug for importing releases.
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Carlo Miguel F. Cruz <[email protected]>
  • Loading branch information
cmfcruz committed Sep 19, 2024
1 parent e67e500 commit 8a58870
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/commands/release/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ export default class ReleaseImportCmd extends Command {
);
}

const application = await balena.models.application.get(params.fleet, {
$select: ['id'],
});
const { getApplication } = await import('../../utils/sdk');
const application = (await getApplication(balena, params.fleet)).id;
if (application == null) {
throw new ExpectedError(`Fleet ${params.fleet} not found`);
}
await apply({
sdk: balena,
application: application.id,
application,
stream: bundle,
version: options['override-version'],
});
Expand Down

0 comments on commit 8a58870

Please sign in to comment.