Skip to content

Commit b86c5d8

Browse files
committed
feat(deploy): skip deployment of hlx--static when --static=bind
#850
1 parent e561ac6 commit b86c5d8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/deploy.cmd.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,16 @@ Alternatively you can auto-add one using the {grey --add <name>} option.`);
336336
// get the list of scripts from the info files
337337
const infos = [...glob.sync(`${this._target}/**/*.info.json`)];
338338
const scriptInfos = await Promise.all(infos.map(info => fs.readJSON(info)));
339-
const scripts = scriptInfos.filter(script => script.zipFile);
340-
341-
// generate action names
342-
scripts.forEach((script) => {
343-
// eslint-disable-next-line no-param-reassign
344-
script.actionName = this.actionName(script);
345-
});
339+
const scripts = scriptInfos
340+
.filter(script => script.zipFile)
341+
// generate action names
342+
.map((script) => {
343+
// eslint-disable-next-line no-param-reassign
344+
script.actionName = this.actionName(script);
345+
return script;
346+
})
347+
// exclude `hlx--static` when deploying static is disabled
348+
.filter(script => this._buildStatic || script.actionName !== 'hlx--static');
346349

347350
const bar = new ProgressBar('[:bar] :action :etas', {
348351
total: scripts.length * 2,

0 commit comments

Comments
 (0)