mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
Implement devices supported command
This commit is contained in:
parent
14f047da53
commit
af8d1e4517
@ -10,6 +10,10 @@ _resin() {
|
||||
local subcommands="create rm restart"
|
||||
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
|
||||
return 0 ;;
|
||||
devices)
|
||||
local subcommands="supported"
|
||||
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
|
||||
return 0 ;;
|
||||
device)
|
||||
local subcommands="rename rm identify"
|
||||
COMPREPLY=( $(compgen -W "${subcommands}" -- ${current}) )
|
||||
|
@ -1,4 +1,4 @@
|
||||
_ = require('lodash')
|
||||
_ = require('lodash-contrib')
|
||||
async = require('async')
|
||||
resin = require('../resin')
|
||||
ui = require('../ui')
|
||||
@ -72,3 +72,7 @@ exports.rename = permissions.user (params) ->
|
||||
|
||||
], (error) ->
|
||||
errors.handle(error) if error?
|
||||
|
||||
exports.supported = permissions.user ->
|
||||
devices = resin.models.device.getSupportedDeviceTypes()
|
||||
_.each(devices, _.unary(log.out))
|
||||
|
@ -136,7 +136,8 @@ capitano.command
|
||||
You can specify the application type with the `--type` option.
|
||||
Otherwise, an interactive dropdown will be shown for you to select from.
|
||||
|
||||
TODO: We should support a command to list all supported device types.
|
||||
You can see a list of supported device types with
|
||||
$ resin devices supported
|
||||
|
||||
Examples:
|
||||
$ resin app create MyApp
|
||||
@ -231,6 +232,17 @@ capitano.command
|
||||
action: actions.device.list
|
||||
options: [ applicationOption ]
|
||||
|
||||
capitano.command
|
||||
signature: 'devices supported'
|
||||
description: 'list all supported devices'
|
||||
help: '''
|
||||
Use this command to get the list of all supported devices
|
||||
|
||||
Examples:
|
||||
$ resin devices supported
|
||||
'''
|
||||
action: actions.device.supported
|
||||
|
||||
capitano.command
|
||||
signature: 'device rename <id> [name]'
|
||||
description: 'rename a resin device'
|
||||
|
Loading…
Reference in New Issue
Block a user