From b672ff1fa1ee12ede7b128d6d5f8f2ab0e088d48 Mon Sep 17 00:00:00 2001 From: Kostas Lekkas Date: Thu, 7 Jul 2016 19:00:24 +0300 Subject: [PATCH] resin sync: change argument/help to a more meaningful 'resin sync [destination]' --- build/actions/sync.js | 10 +++++----- lib/actions/sync.coffee | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/actions/sync.js b/build/actions/sync.js index d4ed4eb1..2d8b8263 100644 --- a/build/actions/sync.js +++ b/build/actions/sync.js @@ -17,9 +17,9 @@ limitations under the License. (function() { module.exports = { - signature: 'sync [source]', + signature: 'sync [destination]', 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 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', + 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 `destination` 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: [ @@ -63,11 +63,11 @@ limitations under the License. if (options.ignore != null) { options.ignore = options.ignore.split(','); } - return resin.models.device.has(params.source).then(function(isValidUUID) { + return resin.models.device.has(params.destination).then(function(isValidUUID) { if (isValidUUID) { - return params.source; + return params.destination; } - return patterns.inferOrSelectDevice(params.source); + return patterns.inferOrSelectDevice(params.destination); }).then(function(uuid) { return resinSync.sync(uuid, options); }).nodeify(done); diff --git a/lib/actions/sync.coffee b/lib/actions/sync.coffee index 529e1ac7..a6912c8f 100644 --- a/lib/actions/sync.coffee +++ b/lib/actions/sync.coffee @@ -15,14 +15,14 @@ limitations under the License. ### module.exports = - signature: 'sync [source]' + signature: 'sync [destination]' description: '(beta) sync your changes with a device' help: ''' WARNING: If you're running Windows, this command only supports `cmd.exe`. Use this command to sync your local changes to a certain device on the fly. - The `source` argument can be either a device uuid or an application name. + The `destination` argument can be either a device uuid or an application name. You can save all the options mentioned below in a `resin-sync.yml` file, by using the same option names as keys. For example: @@ -89,11 +89,11 @@ module.exports = if options.ignore? options.ignore = options.ignore.split(',') - resin.models.device.has(params.source).then (isValidUUID) -> + resin.models.device.has(params.destination).then (isValidUUID) -> if isValidUUID - return params.source + return params.destination - return patterns.inferOrSelectDevice(params.source) + return patterns.inferOrSelectDevice(params.destination) .then (uuid) -> resinSync.sync(uuid, options) .nodeify(done)