Revert 'balena flash' to 'balena local flash'

Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro 2019-05-30 15:18:58 +01:00
parent 01b454351b
commit 1e2e48b149
5 changed files with 28 additions and 7 deletions

View File

@ -178,6 +178,7 @@ If you come across any problems or would like to get in touch:
- Local
- [local configure &#60;target&#62;](#local-configure-target)
- [local flash &#60;image&#62;](#local-flash-image)
- Deploy
@ -1485,6 +1486,26 @@ Examples:
$ balena local configure /dev/sdc
$ balena local configure path/to/image.img
## local flash &#60;image&#62;
Use this command to flash a balenaOS image to a drive.
Examples:
$ balena local flash path/to/balenaos.img[.zip|.gz|.bz2|.xz]
$ balena local flash path/to/balenaos.img --drive /dev/disk2
$ balena local flash path/to/balenaos.img --drive /dev/disk2 --yes
### Options
#### --yes, -y
confirm non-interactively
#### --drive, -d &#60;drive&#62;
drive
# Deploy
## build [source]

View File

@ -26,7 +26,6 @@ module.exports =
logs: require('./logs')
local: require('./local')
scan: require('./scan')
flash: require('./flash').flash
notes: require('./notes')
help: require('./help')
os: require('./os')

View File

@ -35,7 +35,7 @@ async function getDrive(options: {
}
drive = d;
} else {
const { DriveList } = await import('../utils/visuals/drive-list');
const { DriveList } = await import('../../utils/visuals/drive-list');
const driveList = new DriveList(scanner);
drive = await driveList.run();
}
@ -47,16 +47,16 @@ export const flash: CommandDefinition<
{ image: string },
{ drive: string; yes: boolean }
> = {
signature: 'flash <image>',
signature: 'local flash <image>',
description: 'Flash an image to a drive',
help: stripIndent`
Use this command to flash a balenaOS image to a drive.
Examples:
$ balena flash path/to/balenaos.img[.zip|.gz|.bz2|.xz]
$ balena flash path/to/balenaos.img --drive /dev/disk2
$ balena flash path/to/balenaos.img --drive /dev/disk2 --yes
$ balena local flash path/to/balenaos.img[.zip|.gz|.bz2|.xz]
$ balena local flash path/to/balenaos.img --drive /dev/disk2
$ balena local flash path/to/balenaos.img --drive /dev/disk2 --yes
`,
options: [
{

View File

@ -15,3 +15,4 @@ limitations under the License.
###
exports.configure = require('./configure')
exports.flash = require('./flash').flash

View File

@ -122,7 +122,7 @@ capitano.command(actions.ssh.ssh)
# ---------- Local balenaOS Module ----------
capitano.command(actions.local.configure)
capitano.command(actions.flash)
capitano.command(actions.local.flash)
capitano.command(actions.scan)
# ---------- Public utils ----------