From 82ddcbf707cbfcbd2268fa2df03fa69b12e70a58 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 18 Feb 2020 09:25:25 +0000 Subject: [PATCH] Build/Test Tools: Keep `wp-config.php` file in the `build` directory on rebuild. Props isabel_brison. Fixes #49460. git-svn-id: https://develop.svn.wordpress.org/trunk@47303 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 0ed08c39b8..b2562e96ac 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,7 +26,8 @@ module.exports = function(grunt) { 'wp-content/plugins/index.php', 'wp-content/plugins/hello.php', 'wp-content/plugins/akismet/**', - '!wp-content/themes/twenty*/node_modules/**' + '!wp-content/themes/twenty*/node_modules/**', + '!wp-config.php', ], changedFiles = { php: [] @@ -97,6 +98,9 @@ module.exports = function(grunt) { plugins: [BUILD_DIR + 'wp-content/plugins'], themes: [BUILD_DIR + 'wp-content/themes'], files: buildFiles.map( function( file ) { + if ( '!' === file.charAt( 0 ) ) { + return '!' + BUILD_DIR + file.substring( 1 ); + } return BUILD_DIR + file; }), css: [