mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Build tools: Fix build after [43824].
Props omarreiss. See #45145. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43826 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4f05bb81f6
commit
2d74b7157c
12
Gruntfile.js
12
Gruntfile.js
@ -1,7 +1,7 @@
|
||||
/* jshint node:true */
|
||||
/* globals Set */
|
||||
var webpackConfig = require( './webpack.config' );
|
||||
const { execSync } = require( 'child_process' );
|
||||
var execSync = require( 'child_process' ).execSync;
|
||||
|
||||
module.exports = function(grunt) {
|
||||
var path = require('path'),
|
||||
@ -12,7 +12,7 @@ module.exports = function(grunt) {
|
||||
BANNER_TEXT = '/*! This file is auto-generated */',
|
||||
autoprefixer = require( 'autoprefixer' );
|
||||
|
||||
const packageJson = grunt.file.readJSON( 'package.json' );
|
||||
var packageJson = grunt.file.readJSON( 'package.json' );
|
||||
|
||||
// Load tasks.
|
||||
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );
|
||||
@ -788,18 +788,18 @@ module.exports = function(grunt) {
|
||||
] );
|
||||
|
||||
grunt.registerTask( 'download-packages', function() {
|
||||
const directory = 'packages';
|
||||
const version = packageJson.wordpress.packagesVersion;
|
||||
var directory = 'packages';
|
||||
var version = packageJson.wordpress.packagesVersion;
|
||||
|
||||
if ( ! grunt.file.exists( directory ) ) {
|
||||
// Clone gutenberg
|
||||
execSync( `git clone https://github.com/WordPress/gutenberg.git ${ directory }`, { stdio: 'inherit' } );
|
||||
execSync( 'git clone https://github.com/WordPress/gutenberg.git ' + directory, { stdio: 'inherit' } );
|
||||
}
|
||||
|
||||
execSync( 'git fetch --tags', { cwd: directory, stdio: 'inherit' } );
|
||||
|
||||
// Make sure we are on the correct version of Gutenberg.
|
||||
execSync( `git reset --hard ${ version }`, { cwd: directory, stdio: 'inherit' } );
|
||||
execSync( 'git reset --hard ' + version, { cwd: directory, stdio: 'inherit' } );
|
||||
|
||||
// Install Gutenberg dependencies and build the packages.
|
||||
execSync( 'npm install', { cwd: directory, stdio: 'inherit' } );
|
||||
|
Loading…
x
Reference in New Issue
Block a user