Skip to content

Commit

Permalink
fix: firebase#8168 - enforce webframeworks only when needed
Browse files Browse the repository at this point in the history
In deployments where `--only hosting:boo` is used, enforce webframeworks
enablement only when the target actually uses webframeworks.
  • Loading branch information
fivecar committed Feb 5, 2025
1 parent bfeeae0 commit a9c586b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ export const deploy = async function (

if (targetNames.includes("hosting")) {
const config = options.config.get("hosting");
if (Array.isArray(config) ? config.some((it) => it.source) : config.source) {
if (
Array.isArray(config)
? config.some(
(it) =>
it.source &&
(!options.only.includes("hosting:") ||
new RegExp(`\\bhosting:${it.target}\\b`).exec(options.only)),
)
: config.source
) {
console.log("preparing webframeworks");
experiments.assertEnabled("webframeworks", "deploy a web framework from source");
await prepareFrameworks("deploy", targetNames, context, options);
}
Expand Down

0 comments on commit a9c586b

Please sign in to comment.