fix(v2): do not force terminate building when running deploy command (#2496)

This commit is contained in:
Alexey Pyltsyn 2020-04-02 06:04:16 +03:00 committed by GitHub
parent da7fd1a186
commit e902a08b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -47,6 +47,7 @@ function compile(config: Configuration[]): Promise<any> {
export async function build(
siteDir: string,
cliOptions: Partial<BuildCLIOptions> = {},
forceTerminate: boolean = true,
): Promise<string> {
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
@ -150,6 +151,6 @@ export async function build(
relativeDir,
)}.\n`,
);
!cliOptions.bundleAnalyzer && process.exit(0);
forceTerminate && !cliOptions.bundleAnalyzer && process.exit(0);
return outDir;
}

View file

@ -98,7 +98,7 @@ export async function deploy(
fs.removeSync(tempDir);
// Build static html files, then push to deploymentBranch branch of specified repo.
build(siteDir, cliOptions)
build(siteDir, cliOptions, false)
.then(outDir => {
shell.cd(tempDir);