Skip to content

Commit

Permalink
feat: Add —no-next-build option to CLI build command.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTolmay committed Jun 19, 2022
1 parent 9cc0b72 commit 9b565f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/cli/src/commands/build/build.js
Expand Up @@ -32,7 +32,9 @@ async function build({ context }) {
await installServer({ context, directory });
await runLowdefyBuild({ context, directory });
await installServer({ context, directory });
await runNextBuild({ context, directory });
if (context.options.nextBuild !== false) {
await runNextBuild({ context, directory });
}
await context.sendTelemetry({ sendTypes: true });
context.print.succeed(`Build successful.`);
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/index.js
Expand Up @@ -42,6 +42,7 @@ program
'Change config directory. Default is the current working directory.'
)
.option('--disable-telemetry', 'Disable telemetry.')
.option('--no-next-build', 'Do not build the Next.js server.')
.option(
'--package-manager <package-manager>',
'The package manager to use. Options are "npm" or "yarn".'
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/createPrint.js
Expand Up @@ -61,7 +61,7 @@ let print;
function createPrint() {
// TODO: Add debug
if (print) return print;
if (process.env.CI === 'true') {
if (process.env.CI === 'true' || process.env.CI === '1') {
print = createBasicPrint();
return print;
}
Expand Down

0 comments on commit 9b565f4

Please sign in to comment.