mirror of
git://develop.git.wordpress.org/
synced 2025-04-07 21:53:21 +02:00
Build/Test Tools: Allow the local development environment to run on Apple M1 machines without requiring local configuration changes.
The `amd64/mysql` and `amd64/mariadb` official images from Docker are compatible with x86 running on the ARM64v8 architecture of M1 machines. Merges [53358] to the 6.0 branch. Fixes #52356 git-svn-id: https://develop.svn.wordpress.org/branches/6.0@53359 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
43a46408ac
commit
8c26af0268
@ -4,5 +4,9 @@ const { execSync } = require( 'child_process' );
|
||||
|
||||
dotenvExpand.expand( dotenv.config() );
|
||||
|
||||
if ( process.arch === 'arm64' ) {
|
||||
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
|
||||
}
|
||||
|
||||
// Execute any docker-compose command passed to this script.
|
||||
execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
|
||||
|
@ -6,6 +6,10 @@ const { renameSync, readFileSync, writeFileSync } = require( 'fs' );
|
||||
|
||||
dotenvExpand.expand( dotenv.config() );
|
||||
|
||||
if ( process.arch === 'arm64' ) {
|
||||
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
|
||||
}
|
||||
|
||||
// Create wp-config.php.
|
||||
wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --path=/var/www/src --force' );
|
||||
|
||||
|
@ -4,6 +4,10 @@ const { execSync } = require( 'child_process' );
|
||||
|
||||
dotenvExpand.expand( dotenv.config() );
|
||||
|
||||
if ( process.arch === 'arm64' ) {
|
||||
process.env.LOCAL_DB_TYPE = `amd64/${process.env.LOCAL_DB_TYPE}`;
|
||||
}
|
||||
|
||||
// Start the local-env containers.
|
||||
execSync( 'docker-compose up -d wordpress-develop', { stdio: 'inherit' } );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user