-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds filter to monorepo path #25443
Adds filter to monorepo path #25443
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,14 @@ class Monorepo { | |
* Class constructor. | ||
*/ | ||
public function __construct() { | ||
$this->monorepo = '/usr/local/src/jetpack-monorepo/'; | ||
/** | ||
* 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/' ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was dealing with the symlink issue on local environment without Docker. What about defining JETPACK_MONOREPO_PATH? So we just define it directly in the wp-config.php file.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no preference between a filter vs a constant. I find I put a lot of local dev overrides in a But a constant makes a lot of sense, as the monorepo path isn't something that's likely to change dynamically. For reference, here's some of the content of my
|
||
$this->plugins = $this->monorepo . 'projects/plugins/'; | ||
$this->packages = $this->monorepo . 'projects/packages/'; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will ever increment since it isn't in a project, but we can remove it later. Not going to block you for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know!