message='\nThis application is set to automatically update all devices to the latest available version.\nThis might be unexpected behaviour: with this enabled, the preloaded device will still\ndownload and install the latest build once it is online.\n\nDo you want to disable automatic updates for this application?';
returnform.ask({
message:message,
type:'confirm'
}).then(function(update){
if(!update){
return;
}
returnresin.pine.patch({
resource:'application',
id:application.id,
body:{
should_track_latest_release:false
}
});
});
};
module.exports={
signature:'preload <image>',
description:'(beta) preload an app on a disk image',
help:'Warning: "resin preload" requires Docker to be correctly installed in\nyour shell environment. For more information (including Windows support)\nplease check the README here: https://github.com/resin-io/resin-cli .\n\nUse this command to preload an application to a local disk image with a\nbuilt commit from Resin.io.\nThis can be used with cloud builds, or images deployed with resin deploy.\n\nExamples:\n $ resin preload resin.img --app 1234 --commit e1f2592fc6ee949e68756d4f4a48e49bff8d72a0 --splash-image some-image.png\n $ resin preload resin.img',
permission:'user',
primary:true,
options:dockerUtils.appendConnectionOptions([
{
signature:'app',
parameter:'appId',
description:'id of the application to preload',
alias:'a'
},{
signature:'commit',
parameter:'hash',
description:'a specific application commit to preload (ignored if no appId is given)',
alias:'c'
},{
signature:'splash-image',
parameter:'splashImage.png',
description:'path to a png image to replace the splash screen',
alias:'s'
},{
signature:'dont-detect-flasher-type-images',
boolean:true,
description:'Disables the flasher type images detection: treats all images as non flasher types'