Skip to content

Commit

Permalink
Fix paths for writables and shared so they support hooks properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanchilvers committed Sep 30, 2019
1 parent 27cf017 commit 66decc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,22 @@ composer:
install: install --no-dev
after:
- {php} scripts/myscript.php
writables:
- var/log
- var/cache
shared:
files:
- ".env.config.ini"
folders:
- var/log
- var/cache
- var/db
writables:
paths:
- var/log
- var/cache
clear_paths:
- README.md
- package.json
- deploy.yaml
paths:
- README.md
- package.json
- deploy.yaml
```
## Useful things (for development)
Expand Down
2 changes: 1 addition & 1 deletion src/Action/ClearPathsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function run(Config $configuration, Context $context)
'deployment' => $deployment->toArray(),
'deployment_dir' => $deploymentDir,
]);
$clearPaths = $configuration->get('clear_paths', []);
$clearPaths = $configuration->get('clear_paths.paths', []);
if (0 == count($clearPaths)) {
$this->info(
$deployment,
Expand Down
2 changes: 1 addition & 1 deletion src/Action/WritablesAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function run(Config $configuration, Context $context)
$deployment = $context->getOrThrow('deployment', 'Invalid or missing deployment');
$deploymentDir = $context->getOrThrow('deployment_dir', 'Invalid or missing deployment directory');
$writableMode = Settings::get('build.chmod.writable_folder', Builder::MODE_WRITABLE_DIR);
$writables = $configuration->get('writables', []);
$writables = $configuration->get('writables.paths', []);
if (0 == count($writables)) {
$this->info(
$deployment,
Expand Down

0 comments on commit 66decc8

Please sign in to comment.