Build/Test Tools: Keep `wp-config.php` file in the `build` directory on rebuild, but still copy it over from `src` if it also exists there.

Follow-up to [47303].

Props afercia, isabel_brison, SergeyBiryukov.
Fixes #49460.

git-svn-id: https://develop.svn.wordpress.org/trunk@47312 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-02-19 01:48:15 +00:00
parent 2213eb37c4
commit efde364e7c
1 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,6 @@ module.exports = function(grunt) {
'wp-content/plugins/hello.php', 'wp-content/plugins/hello.php',
'wp-content/plugins/akismet/**', 'wp-content/plugins/akismet/**',
'!wp-content/themes/twenty*/node_modules/**', '!wp-content/themes/twenty*/node_modules/**',
'!wp-config.php',
], ],
changedFiles = { changedFiles = {
php: [] php: []
@ -97,12 +96,14 @@ module.exports = function(grunt) {
clean: { clean: {
plugins: [BUILD_DIR + 'wp-content/plugins'], plugins: [BUILD_DIR + 'wp-content/plugins'],
themes: [BUILD_DIR + 'wp-content/themes'], themes: [BUILD_DIR + 'wp-content/themes'],
files: buildFiles.map( function( file ) { files: buildFiles.concat( [
'!wp-config.php',
] ).map( function( file ) {
if ( '!' === file.charAt( 0 ) ) { if ( '!' === file.charAt( 0 ) ) {
return '!' + BUILD_DIR + file.substring( 1 ); return '!' + BUILD_DIR + file.substring( 1 );
} }
return BUILD_DIR + file; return BUILD_DIR + file;
}), } ),
css: [ css: [
WORKING_DIR + 'wp-admin/css/*.min.css', WORKING_DIR + 'wp-admin/css/*.min.css',
WORKING_DIR + 'wp-admin/css/*-rtl*.css', WORKING_DIR + 'wp-admin/css/*-rtl*.css',