From 432df36da11449c22e68d22fc0de926405388968 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Thu, 11 Aug 2022 11:19:33 -0500 Subject: [PATCH 1/2] Adds filter to monorepo path for running development plugin outside docker --- tools/docker/mu-plugins/01-monorepo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/mu-plugins/01-monorepo.php b/tools/docker/mu-plugins/01-monorepo.php index f98a28b6c31fe..c297a249ad53b 100644 --- a/tools/docker/mu-plugins/01-monorepo.php +++ b/tools/docker/mu-plugins/01-monorepo.php @@ -39,7 +39,7 @@ class Monorepo { * Class constructor. */ public function __construct() { - $this->monorepo = '/usr/local/src/jetpack-monorepo/'; + $this->monorepo = apply_filters( 'jetpack_monorepo_path', '/usr/local/src/jetpack-monorepo/' ); $this->plugins = $this->monorepo . 'projects/plugins/'; $this->packages = $this->monorepo . 'projects/packages/'; } From 78b7a968470ce5777ea618543d78858685832943 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Thu, 11 Aug 2022 13:09:04 -0500 Subject: [PATCH 2/2] Add docblock for filter --- tools/docker/mu-plugins/01-monorepo.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/docker/mu-plugins/01-monorepo.php b/tools/docker/mu-plugins/01-monorepo.php index c297a249ad53b..4828169b87678 100644 --- a/tools/docker/mu-plugins/01-monorepo.php +++ b/tools/docker/mu-plugins/01-monorepo.php @@ -39,6 +39,13 @@ class Monorepo { * Class constructor. */ public function __construct() { + /** + * Filter the monorepo path for development environments. + * + * @since $$next-version$$ + * + * @param string $path Monorepo file path. + */ $this->monorepo = apply_filters( 'jetpack_monorepo_path', '/usr/local/src/jetpack-monorepo/' ); $this->plugins = $this->monorepo . 'projects/plugins/'; $this->packages = $this->monorepo . 'projects/packages/';