mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
fix resin local push help message and lint errors
This commit is contained in:
parent
9f3108c5e7
commit
b3aa3d35f7
@ -10,3 +10,7 @@ insert_final_newline = true
|
|||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
@ -17,20 +17,19 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var resinPush;
|
var _, resinPush, resinPushHelp;
|
||||||
|
|
||||||
|
_ = require('lodash');
|
||||||
|
|
||||||
resinPush = require('resin-sync').capitano('resin-toolbox');
|
resinPush = require('resin-sync').capitano('resin-toolbox');
|
||||||
|
|
||||||
resinPush.signature = 'local push [deviceIp]';
|
resinPushHelp = 'Warning: \'resin local push\' requires an openssh-compatible client and \'rsync\' to\nbe correctly installed in your shell environment. For more information (including\nWindows support) please check the README here: https://github.com/resin-io/resin-cli\n\nUse this command to push your local changes to a container on a LAN-accessible resinOS device on the fly.\n\nIf `Dockerfile` or any file in the \'build-triggers\' list is changed,\na new container will be built and run on your device.\nIf not, changes will simply be synced with `rsync` into the application container.\n\nAfter every \'resin local push\' the updated settings will be saved in\n\'<source>/.resin-sync.yml\' and will be used in later invocations. You can\nalso change any option by editing \'.resin-sync.yml\' directly.\n\nHere is an example \'.resin-sync.yml\' :\n\n $ cat $PWD/.resin-sync.yml\n destination: \'/usr/src/app\'\n before: \'echo Hello\'\n after: \'echo Done\'\n ignore:\n - .git\n - node_modules/\n\nCommand line options have precedence over the ones saved in \'.resin-sync.yml\'.\n\nIf \'.gitignore\' is found in the source directory then all explicitly listed files will be\nexcluded when using rsync to update the container. You can choose to change this default behavior with the\n\'--skip-gitignore\' option.\n\nExamples:\n\n $ resin local push\n $ resin local push --app-name test-server --build-triggers package.json,requirements.txt\n $ resin local push --force-build\n $ resin local push --force-build --skip-logs\n $ resin local push --ignore lib/\n $ resin local push --verbose false\n $ resin local push 192.168.2.10 --source . --destination /usr/src/app\n $ resin local push 192.168.2.10 -s /home/user/myResinProject -d /usr/src/app --before \'echo Hello\' --after \'echo Done\'';
|
||||||
|
|
||||||
resinPush.help = {
|
module.exports = _.assign(resinPush, {
|
||||||
help: 'Warning: \'resin local push\' requires an openssh-compatible client and \'rsync\' to\nbe correctly installed in your shell environment. For more information (including\nWindows support) please check the README here: https://github.com/resin-io/resin-cli\n\nUse this command to push your local changes to a container on a LAN-accessible resinOS device on the fly.\n\nIf `Dockerfile` or any file in the \'build-triggers\' list is changed, a new container will be built and run on your device.\nIf not, changes will simply be synced with `rsync` into the application container.\n\nAfter every \'resin local push\' the updated settings will be saved in\n\'<source>/.resin-sync.yml\' and will be used in later invocations. You can\nalso change any option by editing \'.resin-sync.yml\' directly.\n\nHere is an example \'.resin-sync.yml\' :\n\n $ cat $PWD/.resin-sync.yml\n destination: \'/usr/src/app\'\n before: \'echo Hello\'\n after: \'echo Done\'\n ignore:\n - .git\n - node_modules/\n\nCommand line options have precedence over the ones saved in \'.resin-sync.yml\'.\n\nIf \'.gitignore\' is found in the source directory then all explicitly listed files will be\nexcluded when using rsync to update the container. You can choose to change this default behavior with the\n\'--skip-gitignore\' option.\n\nExamples:\n\n $ resin local push\n $ resin local push --app-name test-server --build-triggers package.json,requirements.txt\n $ resin local push --force-build\n $ resin local push --force-build --skip-logs\n $ resin local push --ignore lib/\n $ resin local push --verbose false\n $ resin local push 192.168.2.10 --source . --destination /usr/src/app\n $ resin local push 192.168.2.10 -s /home/user/myResinProject -d /usr/src/app --before \'echo Hello\' --after \'echo Done\''
|
signature: 'local push [deviceIp]',
|
||||||
};
|
help: resinPushHelp,
|
||||||
|
primary: true,
|
||||||
resinPush.primary = true;
|
root: true
|
||||||
|
});
|
||||||
resinPush.root = true;
|
|
||||||
|
|
||||||
module.exports = resinPush;
|
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
@ -30,5 +30,5 @@ gulp.task 'build', [
|
|||||||
'coffee'
|
'coffee'
|
||||||
]
|
]
|
||||||
|
|
||||||
gulp.task 'watch', [ 'lint', 'coffee' ], ->
|
gulp.task 'watch', [ 'build' ], ->
|
||||||
gulp.watch([ OPTIONS.files.coffee ], [ 'coffee' ])
|
gulp.watch([ OPTIONS.files.coffee ], [ 'build' ])
|
||||||
|
@ -18,20 +18,22 @@ limitations under the License.
|
|||||||
# Returns the configuration object on success
|
# Returns the configuration object on success
|
||||||
#
|
#
|
||||||
|
|
||||||
|
_ = require('lodash')
|
||||||
|
|
||||||
resinPush = require('resin-sync').capitano('resin-toolbox')
|
resinPush = require('resin-sync').capitano('resin-toolbox')
|
||||||
|
|
||||||
# TODO: This is a temporary workaround to reuse the existing `rdt push`
|
# TODO: This is a temporary workaround to reuse the existing `rdt push`
|
||||||
# capitano frontend in `resin local push`.
|
# capitano frontend in `resin local push`.
|
||||||
resinPush.signature = 'local push [deviceIp]'
|
|
||||||
resinPush.help =
|
resinPushHelp = '''
|
||||||
help: '''
|
|
||||||
Warning: 'resin local push' requires an openssh-compatible client and 'rsync' to
|
Warning: 'resin local push' requires an openssh-compatible client and 'rsync' to
|
||||||
be correctly installed in your shell environment. For more information (including
|
be correctly installed in your shell environment. For more information (including
|
||||||
Windows support) please check the README here: https://github.com/resin-io/resin-cli
|
Windows support) please check the README here: https://github.com/resin-io/resin-cli
|
||||||
|
|
||||||
Use this command to push your local changes to a container on a LAN-accessible resinOS device on the fly.
|
Use this command to push your local changes to a container on a LAN-accessible resinOS device on the fly.
|
||||||
|
|
||||||
If `Dockerfile` or any file in the 'build-triggers' list is changed, a new container will be built and run on your device.
|
If `Dockerfile` or any file in the 'build-triggers' list is changed,
|
||||||
|
a new container will be built and run on your device.
|
||||||
If not, changes will simply be synced with `rsync` into the application container.
|
If not, changes will simply be synced with `rsync` into the application container.
|
||||||
|
|
||||||
After every 'resin local push' the updated settings will be saved in
|
After every 'resin local push' the updated settings will be saved in
|
||||||
@ -65,6 +67,10 @@ resinPush.help =
|
|||||||
$ resin local push 192.168.2.10 --source . --destination /usr/src/app
|
$ resin local push 192.168.2.10 --source . --destination /usr/src/app
|
||||||
$ resin local push 192.168.2.10 -s /home/user/myResinProject -d /usr/src/app --before 'echo Hello' --after 'echo Done'
|
$ resin local push 192.168.2.10 -s /home/user/myResinProject -d /usr/src/app --before 'echo Hello' --after 'echo Done'
|
||||||
'''
|
'''
|
||||||
resinPush.primary = true
|
|
||||||
resinPush.root = true
|
|
||||||
module.exports = resinPush
|
module.exports = _.assign resinPush,
|
||||||
|
signature: 'local push [deviceIp]'
|
||||||
|
help: resinPushHelp
|
||||||
|
primary: true
|
||||||
|
root: true
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"prepublish": "npm run build",
|
"doc": "mkdir -p doc/ && coffee extras/capitanodoc/index.coffee > doc/cli.markdown",
|
||||||
"doc": "mkdir -p doc/ && coffee extras/capitanodoc/index.coffee > doc/cli.markdown"
|
"watch": "gulp watch",
|
||||||
|
"lint": "gulp lint",
|
||||||
|
"prepublish": "npm run build && npm run doc"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"resin",
|
"resin",
|
||||||
|
Loading…
Reference in New Issue
Block a user