From 1fafe64579b9569f0aa24890afcd9b07d0b84a97 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Wed, 15 Nov 2017 14:46:22 +0100 Subject: [PATCH] Remove resin promote command (which has never worked) to wait for larger resinOS provisioning updates This would be a major change if the command was ever successful, but it appears it hasn't ever worked for any available published version of ResinOS, so it's not possible that there are users relying on it. Change-Type: patch --- build/actions/local/index.js | 2 - build/app.js | 2 - doc/cli.markdown | 28 ------------ lib/actions/local/index.coffee | 1 - lib/actions/local/promote.coffee | 78 -------------------------------- lib/app.coffee | 1 - 6 files changed, 112 deletions(-) delete mode 100644 lib/actions/local/promote.coffee diff --git a/build/actions/local/index.js b/build/actions/local/index.js index 78293325..41cb1e35 100644 --- a/build/actions/local/index.js +++ b/build/actions/local/index.js @@ -21,8 +21,6 @@ exports.flash = require('./flash'); exports.logs = require('./logs'); -exports.promote = require('./promote'); - exports.scan = require('./scan'); exports.ssh = require('./ssh'); diff --git a/build/app.js b/build/app.js index f6bff0be..f6dd24f2 100644 --- a/build/app.js +++ b/build/app.js @@ -216,8 +216,6 @@ capitano.command(actions.local.flash); capitano.command(actions.local.logs); -capitano.command(actions.local.promote); - capitano.command(actions.local.push); capitano.command(actions.local.ssh); diff --git a/doc/cli.markdown b/doc/cli.markdown index 0e6ce911..d969ac79 100644 --- a/doc/cli.markdown +++ b/doc/cli.markdown @@ -134,7 +134,6 @@ environment variable (in the same standard URL format). - [local configure <target>](#local-configure-60-target-62-) - [local flash <image>](#local-flash-60-image-62-) - [local logs [deviceIp]](#local-logs-deviceip-) - - [local promote [deviceIp]](#local-promote-deviceip-) - [local scan](#local-scan) - [local ssh [deviceIp]](#local-ssh-deviceip-) - [local push [deviceIp]](#local-push-deviceip-) @@ -1209,33 +1208,6 @@ follow log name of container to get logs from -## local promote [deviceIp] - -Warning: 'resin promote' requires an openssh-compatible client to 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 - -Use this command to promote your device. - -Promoting a device will provision it onto the Resin platform, -converting it from an unmanaged device to a managed device. - -Examples: - - $ resin local promote - $ resin local promote --port 22222 - $ resin local promote --verbose - -### Options - -#### --verbose, -v - -increase verbosity - -#### --port, -p <port> - -ssh port number (default: 22222) - ## local scan diff --git a/lib/actions/local/index.coffee b/lib/actions/local/index.coffee index 01c37969..1409a0b7 100644 --- a/lib/actions/local/index.coffee +++ b/lib/actions/local/index.coffee @@ -17,7 +17,6 @@ limitations under the License. exports.configure = require('./configure') exports.flash = require('./flash') exports.logs = require('./logs') -exports.promote = require('./promote') exports.scan = require('./scan') exports.ssh = require('./ssh') exports.push = require('./push') diff --git a/lib/actions/local/promote.coffee b/lib/actions/local/promote.coffee deleted file mode 100644 index 66524675..00000000 --- a/lib/actions/local/promote.coffee +++ /dev/null @@ -1,78 +0,0 @@ -### -Copyright 2017 Resin.io - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -### - -module.exports = - signature: 'local promote [deviceIp]' - description: 'Promote a resinOS device' - help: ''' - Warning: 'resin promote' requires an openssh-compatible client to 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 - - Use this command to promote your device. - - Promoting a device will provision it onto the Resin platform, - converting it from an unmanaged device to a managed device. - - Examples: - - $ resin local promote - $ resin local promote --port 22222 - $ resin local promote --verbose - ''' - options: [ - signature: 'verbose' - boolean: true - description: 'increase verbosity' - alias: 'v' - , - signature: 'port' - parameter: 'port' - description: 'ssh port number (default: 22222)' - alias: 'p' - ] - root: true - action: (params, options, done) -> - child_process = require('child_process') - Promise = require 'bluebird' - _ = require('lodash') - - { forms } = require('resin-sync') - { getSubShellCommand } = require('./common') - - options.port ?= 22222 - - verbose = if options.verbose then '-vvv' else '' - - Promise.try -> - return params.deviceIp ?= forms.selectLocalResinOsDevice() - .then (deviceIp) -> - _.assign(options, { deviceIp }) - - command = "ssh \ - #{verbose} \ - -t \ - -p #{options.port} \ - -o LogLevel=ERROR \ - -o StrictHostKeyChecking=no \ - -o UserKnownHostsFile=/dev/null \ - root@#{options.deviceIp} \ - -- \"resin-provision interactive\"" - - subShellCommand = getSubShellCommand(command) - child_process.spawn subShellCommand.program, subShellCommand.args, - stdio: 'inherit' - .nodeify(done) diff --git a/lib/app.coffee b/lib/app.coffee index d43b0941..064877d7 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -193,7 +193,6 @@ capitano.command(actions.ssh) capitano.command(actions.local.configure) capitano.command(actions.local.flash) capitano.command(actions.local.logs) -capitano.command(actions.local.promote) capitano.command(actions.local.push) capitano.command(actions.local.ssh) capitano.command(actions.local.scan)