Make WordPress Core

Changeset 59611


Ignore:
Timestamp:
01/15/2025 01:26:23 PM (2 months ago)
Author:
swissspidy
Message:

Build/Test Tools: Use Git when fetching the WordPress Importer for use in tests.

This switches to using Git in the local Docker environment install script to check out a copy of the WordPress Importer plugin for use in unit tests.

Previously, SVN was used and the commands were not correctly run within the Docker container. The container does not actually have SVN installed, and the script was only working when the machine running the command had SVN present.

Merges [51179] to the 5.7 branch.
Reviewed by desrosj.

Props czapla, alexstine, jnylen0, francina, desrosj.
See #52909.
See #62280.

Location:
branches/5.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/.env

    r58666 r59611  
    7272# The URL to use when running e2e tests.
    7373WP_BASE_URL=http://localhost:${LOCAL_PORT}
    74 
    75 ##
    76 # The revision number of the WordPress Importer plugin to use when running unit tests.
    77 #
    78 # This should be an SVN revision number from the official plugin repository on wordpress.org.
    79 ##
    80 WP_IMPORTER_REVISION=2387243
  • branches/5.7/tools/local-env/scripts/install.js

    r58598 r59611  
    5353 */
    5454function install_wp_importer() {
    55     const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
     55    const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer';
    5656
    57     execSync( `docker compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
     57    execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
     58    execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
    5859}
Note: See TracChangeset for help on using the changeset viewer.