From 223432406da0cb7d73a061ea7e035fd5a27e33e7 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 25 Aug 2017 12:27:38 +0200 Subject: [PATCH 1/2] Add a --dont-check-device-type option for `resin preload` Connects-To: #646 Change-Type: minor --- build/actions/preload.js | 7 +++++++ lib/actions/preload.coffee | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/build/actions/preload.js b/build/actions/preload.js index a720c35c..09a96362 100644 --- a/build/actions/preload.js +++ b/build/actions/preload.js @@ -151,6 +151,10 @@ module.exports = { signature: 'dont-detect-flasher-type-images', boolean: true, description: 'Disables the flasher type images detection: treats all images as non flasher types' + }, { + signature: 'dont-check-device-type', + boolean: true, + description: 'Disables check for matching device types in image and application' } ]), action: function(params, options, done) { @@ -186,6 +190,9 @@ module.exports = { slug = arg.slug, builds = arg.builds; imageInfoSpinner.stop(); return Promise["try"](function() { + if (options['dont-check-device-type'] && !options.appId) { + expectedError('You need to specify an app id if you disable the device type check.'); + } if (options.appId) { return preload.getApplication(resin, options.appId)["catch"](errors.ResinApplicationNotFound, expectedError); } diff --git a/lib/actions/preload.coffee b/lib/actions/preload.coffee index d0c4be72..e931d1c8 100644 --- a/lib/actions/preload.coffee +++ b/lib/actions/preload.coffee @@ -142,6 +142,11 @@ module.exports = boolean: true description: 'Disables the flasher type images detection: treats all images as non flasher types' } + { + signature: 'dont-check-device-type' + boolean: true + description: 'Disables check for matching device types in image and application' + } ] action: (params, options, done) -> _ = require('lodash') @@ -189,6 +194,8 @@ module.exports = imageInfoSpinner.stop() # Use the appId given as --app or show an interactive app selection menu Promise.try -> + if options['dont-check-device-type'] and not options.appId + expectedError('You need to specify an app id if you disable the device type check.') if options.appId return preload.getApplication(resin, options.appId) .catch(errors.ResinApplicationNotFound, expectedError) From a5128cd49ea9335aec00c919cfe6aa89d8c9bbd4 Mon Sep 17 00:00:00 2001 From: "resin-io-versionbot[bot]" Date: Mon, 28 Aug 2017 08:42:44 +0000 Subject: [PATCH 2/2] v6.6.0 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index becc58d0..0c291f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +## v6.6.0 - 2017-08-28 + +* Add a --dont-check-device-type option for `resin preload` #647 [Alexis Svinartchouk] + ## v6.5.3 - 2017-08-24 * Remove resin-preload build filtering workaround. #645 [Alexis Svinartchouk] diff --git a/package.json b/package.json index f12f9b67..321f0ca2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "resin-cli", - "version": "6.5.3", + "version": "6.6.0", "description": "The official resin.io CLI tool", "main": "./build/actions/index.js", "homepage": "https://github.com/resin-io/resin-cli",