Skip to content

Commit

Permalink
comment out final action for testing
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
myarmolinsky committed Nov 11, 2024
1 parent 9f41df4 commit 3169580
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions src/commands/device/os-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,19 @@ export default class DeviceOsUpdateCmd extends Command {
const sdk = getBalenaSdk();

// Get device info
const { uuid, is_of__device_type, os_version, os_variant } =
(await sdk.models.device.get(params.uuid, {
$select: ['uuid', 'os_version', 'os_variant'],
$expand: {
is_of__device_type: {
$select: 'slug',
},
const {
// uuid,
is_of__device_type,
os_version,
os_variant,
} = (await sdk.models.device.get(params.uuid, {
$select: ['uuid', 'os_version', 'os_variant'],
$expand: {
is_of__device_type: {
$select: 'slug',
},
})) as DeviceWithDeviceType;
},
})) as DeviceWithDeviceType;

// Get current device OS version
const currentOsVersion = sdk.models.device.getOsVersion({
Expand Down Expand Up @@ -173,18 +177,18 @@ export default class DeviceOsUpdateCmd extends Command {
'Host OS updates require a device restart when they complete. Are you sure you want to proceed?',
);

await sdk.models.device
.startOsUpdate(uuid, targetOsVersion, {
runDetached: true,
})
.then(() => {
console.log(
`The balena OS update has started. You can keep track of the progress via the dashboard.\n` +
`To open the dashboard page related to a device via the CLI, you can use \`balena device UUID --view\``,
);
})
.catch((error) => {
console.error(`Failed to start OS update for device ${uuid}:`, error);
});
// await sdk.models.device
// .startOsUpdate(uuid, targetOsVersion, {
// runDetached: true,
// })
// .then(() => {
// console.log(
// `The balena OS update has started. You can keep track of the progress via the dashboard.\n` +
// `To open the dashboard page related to a device via the CLI, you can use \`balena device UUID --view\``,
// );
// })
// .catch((error) => {
// console.error(`Failed to start OS update for device ${uuid}:`, error);
// });
}
}

0 comments on commit 3169580

Please sign in to comment.