Support verbose flag for resin sync

This commit is contained in:
Kostas Lekkas 2016-06-22 17:59:14 +03:00
parent 0d7d6de7cd
commit 6d1d4dc173
2 changed files with 14 additions and 1 deletions

View File

@ -19,7 +19,7 @@ limitations under the License.
module.exports = {
signature: 'sync [source]',
description: '(beta) sync your changes with a device',
help: 'WARNING: If you\'re running Windows, this command only supports `cmd.exe`.\n\nUse this command to sync your local changes to a certain device on the fly.\n\nThe `source` argument can be either a device uuid or an application name.\n\nYou can save all the options mentioned below in a `resin-sync.yml` file,\nby using the same option names as keys. For example:\n\n $ cat $PWD/resin-sync.yml\n source: src/\n before: \'echo Hello\'\n ignore:\n - .git\n - node_modules/\n progress: true\n\nNotice that explicitly passed command options override the ones set in the configuration file.\n\nExamples:\n\n $ resin sync MyApp\n $ resin sync 7cf02a6\n $ resin sync 7cf02a6 --port 8080\n $ resin sync 7cf02a6 --ignore foo,bar',
help: 'WARNING: If you\'re running Windows, this command only supports `cmd.exe`.\n\nUse this command to sync your local changes to a certain device on the fly.\n\nThe `source` argument can be either a device uuid or an application name.\n\nYou can save all the options mentioned below in a `resin-sync.yml` file,\nby using the same option names as keys. For example:\n\n $ cat $PWD/resin-sync.yml\n source: src/\n before: \'echo Hello\'\n ignore:\n - .git\n - node_modules/\n progress: true\n verbose: false\n\nNotice that explicitly passed command options override the ones set in the configuration file.\n\nExamples:\n\n $ resin sync MyApp\n $ resin sync 7cf02a6\n $ resin sync 7cf02a6 --port 8080\n $ resin sync 7cf02a6 --ignore foo,bar\n $ resin sync 7cf02a6 -v',
permission: 'user',
primary: true,
options: [
@ -48,6 +48,11 @@ limitations under the License.
parameter: 'port',
description: 'ssh port',
alias: 't'
}, {
signature: 'verbose',
boolean: true,
description: 'increase verbosity',
alias: 'v'
}
],
action: function(params, options, done) {

View File

@ -34,6 +34,7 @@ module.exports =
- .git
- node_modules/
progress: true
verbose: false
Notice that explicitly passed command options override the ones set in the configuration file.
@ -43,6 +44,7 @@ module.exports =
$ resin sync 7cf02a6
$ resin sync 7cf02a6 --port 8080
$ resin sync 7cf02a6 --ignore foo,bar
$ resin sync 7cf02a6 -v
'''
permission: 'user'
primary: true
@ -71,6 +73,12 @@ module.exports =
parameter: 'port'
description: 'ssh port'
alias: 't'
,
signature: 'verbose'
boolean: true
description: 'increase verbosity'
alias: 'v'
,
]
action: (params, options, done) ->
resin = require('resin-sdk')