Skip to content
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

Update composer multidev-search-replace syntax #158

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/composer/class-mitcomposerscripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function multidev_create_syntax( $event ): void {
*/
public static function multidev_search_replace_syntax( $event ): void {
$multidev = self::multidev_name( $event );
$terminus_command = "terminus remote:wp mitlib-wp-network.$multidev -- search-replace live-mitlib-wp-network.pantheonsite.io $multidev-mitlib-wp-network.pantheonsite.io --url=live-mitlib-wp-network.pantheonsite.io --network";
$terminus_command = "terminus remote:wp mitlib-wp-network.$multidev -- search-replace libraries.mit.edu $multidev-mitlib-wp-network.pantheonsite.io --url=libraries.mit.edu --network";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify what this is fixing? I'm assuming behavior has been weird since launch and we've needed to manually re-run the search-replace and this will possible make moving data between tiers less manual?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the reminder about what search-replace command we should be running - it doesn't actually run the command.

The current output:

% composer multidev-search-replace-syntax pw-106
> MitComposerScripts::multidev_search_replace_syntax
terminus remote:wp mitlib-wp-network.pw-106 -- search-replace live-mitlib-wp-network.pantheonsite.io pw-106-mitlib-wp-network.pantheonsite.io --url=live-mitlib-wp-network.pantheonsite.io --network

The problem is that this command won't do what we need now that we've got our domain in place. So every time we get this reminder, we need to remember to update the live-mitlib-wp-network.pantheonsite.io value.

This PR changes the output to be something that is accurate:

% composer multidev-search-replace-syntax pw-106
> MitComposerScripts::multidev_search_replace_syntax
terminus remote:wp mitlib-wp-network.pw-106 -- search-replace libraries.mit.edu pw-106-mitlib-wp-network.pantheonsite.io --url=libraries.mit.edu --network

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right! I totally forgot about that. Thanks for the reminder.

$event->getIO()->write( $terminus_command );
$event->getIO()->write( '-----' );
}
Expand Down
Loading