Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
Some script tags do not return the correct release path.
Browse files Browse the repository at this point in the history
  • Loading branch information
warrickbayman committed Oct 21, 2021
1 parent d77f18d commit d85a7ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.7.9] 21-10-2021
### Fixed
* Fixed a bug where the release ID was not passed into the script compiler correctly. Some script tags would not return the correct release path.

## [0.7.8] 27-09-2021
### Changed
* Attache will now first check that an asset exists before trying to copy to the target server.
Expand Down
2 changes: 1 addition & 1 deletion bin/attache
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) {
require __DIR__.'/../../../autoload.php';
}

$app = new \Symfony\Component\Console\Application('Attaché', '0.7.7');
$app = new \Symfony\Component\Console\Application('Attaché', '0.7.9');

$app->add(new \TPG\Attache\Console\InitCommand());
$app->add(new \TPG\Attache\Console\ServersListCommand());
Expand Down
12 changes: 6 additions & 6 deletions src/Deployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ protected function installationSteps(bool $install, string $releasePath): array
protected function symlinkSteps(string $releasePath): array
{
return [
...$this->server->script('before-symlinks', $this->server->root()),
...$this->server->script('before-symlinks', Str::afterLast($releasePath, '/'), $this->server->root()),
'ln -nfs '.$this->server->path('storage').' '.$releasePath.'/storage',
'ln -nfs '.$this->server->path('env').' '.$releasePath.'/.env',
...$this->server->script('after-symlinks', $this->server->root()),
...$this->server->script('after-symlinks', Str::afterLast($releasePath, '/'), $this->server->root()),
];
}

Expand All @@ -280,10 +280,10 @@ protected function composerSteps(string $releasePath): array
}

return [
...$this->server->script('before-composer', $this->server->root()),
...$this->server->script('before-composer', Str::afterLast($releasePath, '/'), $this->server->root()),
'cd '.$releasePath.PHP_EOL
.$composerCommand,
...$this->server->script('after-composer', $this->server->root()),
...$this->server->script('after-composer', Str::afterLast($releasePath, '/'), $this->server->root()),
];
}

Expand Down Expand Up @@ -326,10 +326,10 @@ protected function generateKeySteps(bool $install, string $releasePath): array
protected function migrationSteps(bool $migrate, string $releasePath): array
{
return $migrate ? [
...$this->server->script('before-migrate', $this->server->root()),
...$this->server->script('before-migrate', Str::afterLast($releasePath, '/'), $this->server->root()),
'cd '.$this->server->root(),
$this->server->phpBin().' '.$releasePath.'/artisan migrate --force',
...$this->server->script('after-migrate', $this->server->root()),
...$this->server->script('after-migrate', Str::afterLast($releasePath, '/'), $this->server->root()),
] : [];
}

Expand Down

0 comments on commit d85a7ca

Please sign in to comment.