Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Merge details:

commit 0cb84f7
Author: Jelle Sebreghts <[email protected]>
Date:   Thu Jan 18 09:37:04 2024

    Update path to drush

    The drush-launcher is deprecated and doesn't work for drush >=12. Update
    to the vendor/bin/drush executable.
  • Loading branch information
Jelle-S committed Jan 18, 2024
2 parents 3f080eb + 0cb84f7 commit 500637d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/EventHandler/ClearCacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,31 @@ public function handle(GenericEvent $event)
/** @var RemoteConfig $remoteConfig */
$remoteConfig = $event->getArgument('remoteConfig');
$remoteSettings = $remoteConfig->getRemoteSettings();
$currentWebRoot = $remoteSettings['currentdir'];
$currentProjectRoot = $remoteConfig->getCurrentProjectRoot();
$aliases = $remoteSettings['aliases'] ?: [0 => false];
$collection = $this->collectionBuilder();
$auth = new KeyFile($remoteConfig->getUser(), $remoteConfig->getPrivateKeyFile());
foreach ($aliases as $uri => $alias) {
$drushCommand = CommandBuilder::create('../vendor/bin/drush');
$drushCommand = CommandBuilder::create('vendor/bin/drush');
if ($alias) {
$drushCommand->addOption('uri', $uri);
}
$collection->taskSsh($remoteConfig->getHost(), $auth)
->remoteDirectory($currentWebRoot, true)
->remoteDirectory($currentProjectRoot, true)
->timeout(120)
->exec((string) (clone $drushCommand)->addArgument('cr'))
->exec((string) (clone $drushCommand)->addArgument('cc')->addArgument('drush'));

$purge = $this->taskSsh($remoteConfig->getHost(), $auth)
->remoteDirectory($currentWebRoot, true)
->remoteDirectory($currentProjectRoot, true)
->timeout(120)
// Check if the drush_purge module is enabled and if an 'everything'
// purger is configured.
->exec(
(string) $this->checkModuleCommand('purge_drush', $remoteSettings, $uri)
->onSuccess('cd')
->addFlag('P')
->addArgument($currentWebRoot)
->addArgument($currentProjectRoot)
->onSuccess(
(clone $drushCommand)
->addArgument('ptyp')
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/Drupal8UtilsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function varnishCheckCommand($uri = '')
{
$this->readProperties();

$drushVersion = $this->taskDrushStack()
$drushVersion = $this->taskDrushStack('vendor/bin/drush')
->drupalRootDirectory($this->getConfig()->get('digipolis.root.web'));
if ($uri) {
$drushVersion->uri($uri);
Expand Down Expand Up @@ -136,7 +136,7 @@ public function checkModuleCommand($module, $remote = null, $uri = false)
{
$this->readProperties();

$drushVersion = $this->taskDrushStack();
$drushVersion = $this->taskDrushStack('vendor/bin/drush');
if ($uri) {
$drushVersion->uri($uri);
}
Expand Down

0 comments on commit 500637d

Please sign in to comment.