-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename files to not clash with any other recipe file named the same
- Loading branch information
Showing
6 changed files
with
197 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Setono\Deployer\DotEnv; | ||
|
||
use function Deployer\after; | ||
use function Deployer\before; | ||
use Deployer\Deployer; | ||
|
||
require_once __DIR__ . '/../task/setono_dotenv.php'; | ||
|
||
after('deploy:update_code', 'dotenv:prepare'); | ||
|
||
$deployer = Deployer::get(); | ||
|
||
/** | ||
* The task deploy:cache:clear is defined in Symfony related recipes and both the cache clear | ||
* and cache warmup tasks sometimes depend on environment variables. Therefore it's a good idea | ||
* to have environment variables defined before running these tasks. | ||
*/ | ||
if ($deployer->tasks->has('deploy:cache:clear')) { | ||
before('deploy:cache:clear', 'dotenv:update'); | ||
} else { | ||
before('deploy:symlink', 'dotenv:update'); | ||
} | ||
|
||
before('dotenv:update', 'dotenv:generate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.