-
Notifications
You must be signed in to change notification settings - Fork 132
Run Nx + Next.js builds from root context #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,19 @@ if (process.env.FIREBASE_APP_DIRECTORY) { | |
projectRoot = projectRoot.concat("/", process.env.FIREBASE_APP_DIRECTORY); | ||
} | ||
|
||
// Determine which build runner to use | ||
let cmd = DEFAULT_COMMAND; | ||
if (process.env.MONOREPO_COMMAND) { | ||
cmd = process.env.MONOREPO_COMMAND; | ||
// Determine which command to run the build | ||
const cmd = process.env.MONOREPO_COMMAND || DEFAULT_COMMAND; | ||
|
||
// Parse args to pass to the build command | ||
let cmdArgs: string[] = []; | ||
if (process.env.MONOREPO_BUILD_ARGS) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is MONOREPO build args set? I dont see it anywhere in the buildpacks code either There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MONOREPO_BUILD_ARGS is a new environment variable added in cl/631875763 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I'm missing something, but I can't seem to find MONOREPO_BUILD_ARGS in that cl. Could you help point me to it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoops sorry, just uploaded the changes - should be in line 95 of |
||
cmdArgs = process.env.MONOREPO_BUILD_ARGS.split(","); | ||
} | ||
|
||
build(projectRoot, cmd); | ||
// Run build command from the subdirectory if specified. | ||
// N.B. We run the build command from the root for monorepo builds, so that the build process can | ||
// locate necessary files outside the project directory. | ||
build(process.env.MONOREPO_CMD ? root : projectRoot, cmd, ...cmdArgs); | ||
|
||
const outputBundleOptions = populateOutputBundleOptions(root, projectRoot); | ||
const { distDir } = await loadConfig(root, projectRoot); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to line 31 right above where its first used?