Added --squash option to resin build command

This commit is contained in:
Jacinto Arias 2017-06-23 17:20:16 +02:00 committed by Tim Perry
parent abebf6b4f4
commit bea7b2035a
3 changed files with 22 additions and 0 deletions

View File

@ -53,6 +53,10 @@ exports.appendOptions = function(opts) {
description: 'Run an emulated build using Qemu',
boolean: true,
alias: 'e'
}, {
signature: 'squash',
description: 'Squash newly built layers into a single new layer',
boolean: true
}
]);
};
@ -280,6 +284,9 @@ exports.runBuild = function(params, options, getBundleInfo, logStreams) {
return logging.logWarn(logStreams, "Could not parse variable: '" + arg + "'");
});
}
if (options.squash != null) {
opts['squash'] = true;
}
return builder.createBuildStream(opts, hooks, reject);
});
});

View File

@ -1406,6 +1406,10 @@ Don't use docker layer caching when building
Run an emulated build using Qemu
#### --squash
Squash newly built layers into a single new layer
## deploy <appName> [image]
Use this command to deploy an image to an application, optionally building it first.
@ -1473,6 +1477,10 @@ Don't use docker layer caching when building
Run an emulated build using Qemu
#### --squash
Squash newly built layers into a single new layer
# Utilities
## util available-drives

View File

@ -66,6 +66,11 @@ exports.appendOptions = (opts) ->
description: 'Run an emulated build using Qemu'
boolean: true
alias: 'e'
},
{
signature: 'squash'
description: 'Squash newly built layers into a single new layer'
boolean: true
}
]
@ -290,6 +295,8 @@ exports.runBuild = (params, options, getBundleInfo, logStreams) ->
if options.buildArg?
opts['buildargs'] = parseBuildArgs options.buildArg, (arg) ->
logging.logWarn(logStreams, "Could not parse variable: '#{arg}'")
if options.squash?
opts['squash'] = true
builder.createBuildStream(opts, hooks, reject)