Skip to content

Commit

Permalink
Run the correct core build command.
Browse files Browse the repository at this point in the history
  • Loading branch information
pento committed Aug 19, 2019
1 parent 922ccb1 commit 48816cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/scripts/scripts/env/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const args = getArgsFromCLI();
const localDir = env.LOCAL_DIR || 'src';

// Run PHPUnit with the working directory set correctly.
execSync( `npm run env:cli -- --path=${ localDir } ` + args.join( ' ' ), { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
execSync( `npm run env:cli -- --path=/var/www/${ localDir } ` + args.join( ' ' ), { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
8 changes: 6 additions & 2 deletions packages/scripts/scripts/env/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ if ( commandExistsSync( 'git' ) ) {
function buildWordPress() {
execSync( 'npm install', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
execSync( 'npm run env:start', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
execSync( 'npm run build:dev', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
if ( env.LOCAL_DIR === 'build' ) {
execSync( 'npm run build', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
} else {
execSync( 'npm run build:dev', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
}
execSync( 'npm run env:install', { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );

// Mount Gutenberg into the WordPress install.
execSync( 'npm run env connect', { stdio: 'inherit' } );
execSync( `npm run env:cli plugin activate ${ env.npm_package_wp_env_plugin_dir }`, { cwd: normalize( env.WP_DEVELOP_DIR ), stdio: 'inherit' } );
execSync( `npm run env cli plugin activate ${ env.npm_package_wp_env_plugin_dir }`, { stdio: 'inherit' } );
}

0 comments on commit 48816cf

Please sign in to comment.