Merge pull request #577 from jacintoArias/master

Allow --squash option on resin build command
This commit is contained in:
Tim Perry 2017-06-26 13:35:35 +02:00 committed by GitHub
commit 6b22166887
4 changed files with 26 additions and 0 deletions

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## Added
- Added support for `--squash` parameter for `resin build`
## Fixed
- **Breaking** Remove Buffer polyfill, require Node v6+, and print warnings in older versions

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)