Skip to content

Commit 657b6ff

Browse files
committed
Build/Test Tools: Force run grunt clean --dev before build.
Seemingly as a side effect of [61438], the built code base contains a number of files and directories that have been moved or removed. `grunt clean` was updated to be aware of the newly expected files in [62051], but the `clean` tasks required to ensure a pristine working state are not run prior to `build`. This runs the `clean --dev` task is run immediately before `grunt build` runs as an attempt to clean up these files by ensuring a clean `src` directory. Props jorbin. See #64393. git-svn-id: https://develop.svn.wordpress.org/trunk@62069 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ea53b95 commit 657b6ff

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Gruntfile.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,9 +2063,19 @@ module.exports = function(grunt) {
20632063
] );
20642064

20652065
grunt.registerTask( 'build', function() {
2066+
var done = this.async();
2067+
2068+
grunt.util.spawn( {
2069+
grunt: true,
2070+
args: [ 'clean', '--dev' ],
2071+
opts: { stdio: 'inherit' }
2072+
}, function( buildError ) {
2073+
done( ! buildError );
2074+
} );
2075+
20662076
if ( grunt.option( 'dev' ) ) {
20672077
grunt.task.run( [
2068-
'gutenberg:verify',
2078+
'gutenberg:download',
20692079
'build:js',
20702080
'build:css',
20712081
'build:codemirror',
@@ -2075,7 +2085,7 @@ module.exports = function(grunt) {
20752085
] );
20762086
} else {
20772087
grunt.task.run( [
2078-
'gutenberg:verify',
2088+
'gutenberg:download',
20792089
'build:certificates',
20802090
'build:files',
20812091
'build:js',

0 commit comments

Comments
 (0)