Skip to content

Commit

Permalink
fix create create release directory
Browse files Browse the repository at this point in the history
  • Loading branch information
julienj committed Mar 10, 2024
1 parent 1c5c230 commit 723334e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Automate/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$context->connect();
$logger->section('Check git access');
$context->exec(function (Session $session) use ($project) {
$context->exec(static function (Session $session) use ($project): void {
$session->exec('git ls-remote '.$project->getRepository(), false);
});
} catch (\Exception $exception) {
Expand Down
6 changes: 3 additions & 3 deletions src/Automate/VariableResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

class VariableResolver
{
public const string ENV_PREFIX = 'AUTOMATE__';
private const string ENV_PREFIX = 'AUTOMATE__';

public const string VAR_PREFIX = '%';
private const string VAR_PREFIX = '%';

public const string VAR_SUFFIX = '%';
private const string VAR_SUFFIX = '%';

/**
* VariableResolver constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/Automate/Workflow/Deployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private function activateSymlink(): void
private function createReleaseDirectory(): void
{
$this->context->exec(static function (Session $session): void {
$session->mkdir($session->getReleasePath());
$session->mkdir($session->getReleasePath(), true);
});
}
}
2 changes: 1 addition & 1 deletion src/Automate/Workflow/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function symlink(string $target, string $link): void

public function touch(string $path): void
{
$this->exec(sprintf('mkdir -p %s', dirname($path)), false);
$this->mkdir(dirname($path), true);
$this->exec(sprintf('touch %s', $path), false);
}

Expand Down

0 comments on commit 723334e

Please sign in to comment.