Skip to content

Commit

Permalink
Merge branch 'hotfix/3.2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Dec 6, 2019
2 parents a196288 + ccaae79 commit 3de86de
Show file tree
Hide file tree
Showing 11 changed files with 274 additions and 54 deletions.
9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.2.7 / 2019-12-06

### New/Fixed:

* Ignore ssl errors when running tests'
* Better way of handling relative paths in LocalShell
* Refactor RunCommandBase to define a runContext. Could be host, or dockerHost
* Bump symfony/http-foundation from 4.2.3 to 4.4.1

## 3.2.6 / 2019-12-01

### Fixed:
Expand Down
206 changes: 193 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions src/Method/ComposerMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ public function getName(): string
return 'composer';
}

protected function getExecutableName(): string
{
return 'composer';
}

protected function getRootFolderKey(): string
{
return 'composerRootFolder';
}

protected function prepareCommand(HostConfig $host_config, TaskContextInterface $context, string $command)
{
if (!in_array($host_config['type'], array('dev', 'test'))) {
Expand Down Expand Up @@ -66,5 +56,4 @@ public function appUpdate(HostConfig $host_config, TaskContextInterface $context
{
$this->runCommand($host_config, $context, 'update');
}

}
14 changes: 9 additions & 5 deletions src/Method/DockerMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private function runTaskImpl(HostConfig $host_config, TaskContextInterface $cont
]);
$context->set('environment', $environment);
$context->set('callbacks', $callbacks);
$context->set('rootFolder', $docker_config['rootFolder']);
$context->set('rootFolder', self::getProjectFolder($docker_config, $host_config));
$context->setShell($docker_config->shell());
$docker_config->shell()->setOutput($context->getOutput());

Expand Down Expand Up @@ -245,6 +245,11 @@ public function waitForServices(HostConfig $hostconfig, TaskContextInterface $co
$this->logger->error('Supervisord not coming up at all!');
}

public static function getProjectFolder(DockerConfig $docker_config, HostConfig $host_config)
{
return $docker_config['rootFolder'] . '/'. $host_config['docker']['projectFolder'];
}

/**
* @param HostConfig $hostconfig
* @param TaskContextInterface $context
Expand Down Expand Up @@ -299,7 +304,7 @@ private function copySSHKeys(HostConfig $hostconfig, TaskContextInterface $conte
}

$docker_config = $this->getDockerConfig($hostconfig, $context->getConfigurationService());
$root_folder = $docker_config['rootFolder'] . '/' . $hostconfig['docker']['projectFolder'];
$root_folder = $this->getProjectFolder($docker_config, $hostconfig);

/** @var ShellProviderInterface $shell */
$shell = $docker_config->shell();
Expand Down Expand Up @@ -479,8 +484,7 @@ public function appCheckExisting(HostConfig $host_config, TaskContextInterface $
// Set outer-shell to the one provided by the docker-configuration.
$docker_config = $this->getDockerConfig($host_config, $context->getConfigurationService());
$context->setResult('outerShell', $docker_config->shell());
$context->setResult('installDir', $docker_config['rootFolder'] .
'/' . $host_config['docker']['projectFolder']);
$context->setResult('installDir', $this->getProjectFolder($docker_config, $host_config));
}

/**
Expand Down Expand Up @@ -556,7 +560,7 @@ public static function getDockerContainerName(HostConfig $host_config, Configura
$docker_config = self::getDockerConfig($host_config, $config);
$shell = $docker_config->shell();
$cwd = $shell->getWorkingDir();
$shell->cd($docker_config['rootFolder'] . '/' . $host_config['docker']['projectFolder']);
$shell->cd(self::getProjectFolder($docker_config, $host_config));
$result = $shell->run('#!docker-compose ps', true);
$shell->cd($cwd);
$docker_name = false;
Expand Down
10 changes: 0 additions & 10 deletions src/Method/NpmMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ public function getName(): string
return 'npm';
}

protected function getExecutableName(): string
{
return 'npm';
}

protected function getRootFolderKey(): string
{
return 'npmRootFolder';
}

public function validateConfig(array $config, ValidationErrorBagInterface $errors)
{
parent::validateConfig($config, $errors); // TODO: Change the autogenerated stub
Expand Down
Loading

0 comments on commit 3de86de

Please sign in to comment.