Skip to content

Commit

Permalink
run DC build with an optional --pull (lando#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebymikey committed Mar 1, 2023
1 parent 86a9726 commit bc89b23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const buildShell = (run, name, compose, opts = {}) => ({
* Run docker compose build
*/
exports.build = (compose, project, opts = {}) => {
return buildShell('build', project, compose, {pull: _.isEmpty(opts.local)});
return buildShell('build', project, compose, {pull: _.isEmpty(opts.pullable) || _.isEmpty(opts.local)});
};

/*
Expand Down
6 changes: 2 additions & 4 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ exports.eventWrapper = (name, daemon, events, data, run) => daemon.up()
* Helper to route to build command
*/
exports.build = (data, compose) => {
// Pull
return retryEach(data, datum => compose('pull', datum))
// then build
.then(() => retryEach(data, datum => compose('build', datum)));
// Build (with optional "--pull")
return retryEach(data, datum => compose('build', datum));
};

/*
Expand Down

0 comments on commit bc89b23

Please sign in to comment.