summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Desrosiers <desrosj@git.wordpress.org>2025-01-15 16:14:35 +0000
committerJonathan Desrosiers <desrosj@git.wordpress.org>2025-01-15 16:14:35 +0000
commitf36623613dc89fa90056a2ccee21ff7c6b23cbbd (patch)
treebf22759c678b55e9fa87403a28be6f3cb8bc618e
parent89afc994309bee0b248b576ad553c4a476d9d98e (diff)
downloadwordpress-f36623613dc89fa90056a2ccee21ff7c6b23cbbd.tar.gz
wordpress-f36623613dc89fa90056a2ccee21ff7c6b23cbbd.zip
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 4.5 branch. Reviewed by swissspidy. Props czapla, alexstine, jnylen0, francina, desrosj. See #52909. See #62280. git-svn-id: https://develop.svn.wordpress.org/branches/4.5@59623 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r--.env7
-rw-r--r--tools/local-env/scripts/install.js5
2 files changed, 3 insertions, 9 deletions
diff --git a/.env b/.env
index d9a24741ba..25b69e1f28 100644
--- a/.env
+++ b/.env
@@ -71,10 +71,3 @@ LOCAL_WP_ENVIRONMENT_TYPE=local
# The URL to use when running e2e tests.
WP_BASE_URL=http://localhost:${LOCAL_PORT}
-
-##
-# The revision number of the WordPress Importer plugin to use when running unit tests.
-#
-# This should be an SVN revision number from the official plugin repository on wordpress.org.
-##
-WP_IMPORTER_REVISION=2387243
diff --git a/tools/local-env/scripts/install.js b/tools/local-env/scripts/install.js
index 5b60d4c11a..99d42314e9 100644
--- a/tools/local-env/scripts/install.js
+++ b/tools/local-env/scripts/install.js
@@ -52,7 +52,8 @@ function wp_cli( cmd ) {
* Downloads the WordPress Importer plugin for use in tests.
*/
function install_wp_importer() {
- const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
+ const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer';
- 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' } );
+ execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
+ execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1 --branch 0.7`, { stdio: 'inherit' } );
}