Support pinned release preloading

Change-type: minor
Closes: #886
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-05-30 14:33:05 +01:00
parent bc86359e63
commit 1a48fed1f7
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1
3 changed files with 15 additions and 1 deletions

View File

@ -1206,6 +1206,10 @@ path to a png image to replace the splash screen
Disables check for matching device types in image and application
#### --pin-device-to-release, -p
Pin the preloaded device to the preloaded release on provision
#### --docker, -P &#60;docker&#62;
Path to a local docker socket

View File

@ -144,6 +144,12 @@ module.exports =
boolean: true
description: 'Disables check for matching device types in image and application'
}
{
signature: 'pin-device-to-release'
boolean: true
description: 'Pin the preloaded device to the preloaded release on provision'
alias: 'p'
}
]
action: (params, options, done) ->
_ = require('lodash')
@ -186,6 +192,9 @@ module.exports =
if options.dontCheckDeviceType and not options.appId
exitWithExpectedError('You need to specify an app id if you disable the device type check.')
options.pinDevice = options['pin-device-to-release']
delete options['pin-device-to-release']
# Get a configured dockerode instance
dockerUtils.getDocker(options)
.then (docker) ->
@ -199,6 +208,7 @@ module.exports =
options.splashImage
options.proxy
options.dontCheckDeviceType
options.pinDevice
)
gotSignal = false

View File

@ -146,7 +146,7 @@
"resin-image-fs": "^5.0.2",
"resin-image-manager": "^5.0.0",
"resin-multibuild": "^0.5.1",
"resin-preload": "^6.2.0",
"resin-preload": "^6.3.0",
"resin-release": "^1.2.0",
"resin-sdk": "9.0.0-beta18",
"resin-sdk-preconfigured": "^6.9.0",