mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
minor #14918 [Tasks] Improve Robo task (Rafikooo)
This PR was merged into the 1.12 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.12 and 1.13 <!-- see the comment below --> |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file --> |
| License | MIT |
It runs `composer validate` after `composer update` and handles the case of already created directories
Commits
-------
b9d2233b07 [Tasks] Improve Robo task
This commit is contained in:
commit
971bef194d
1 changed files with 13 additions and 5 deletions
18
RoboFile.php
18
RoboFile.php
|
|
@ -75,8 +75,8 @@ class RoboFile extends Tasks
|
|||
}
|
||||
|
||||
$task
|
||||
->exec('composer validate --ansi --strict')
|
||||
->exec('composer update --no-scripts --no-interaction')
|
||||
->exec('composer validate --ansi --strict')
|
||||
;
|
||||
|
||||
if (in_array($package, ['Bundle/AdminBundle', 'Bundle/ApiBundle', 'Bundle/CoreBundle'])) {
|
||||
|
|
@ -103,10 +103,18 @@ class RoboFile extends Tasks
|
|||
|
||||
private function createTestAssets(string $testAppDirectory): void
|
||||
{
|
||||
mkdir(sprintf('%s/public/build/admin', $testAppDirectory), 0777, true);
|
||||
mkdir(sprintf('%s/public/build/shop', $testAppDirectory), 0777, true);
|
||||
file_put_contents(sprintf('%s/public/build/admin/manifest.json', $testAppDirectory), '{}');
|
||||
file_put_contents(sprintf('%s/public/build/shop/manifest.json', $testAppDirectory), '{}');
|
||||
$adminBuildDir = sprintf('%s/public/build/admin', $testAppDirectory);
|
||||
$shopBuildDir = sprintf('%s/public/build/shop', $testAppDirectory);
|
||||
|
||||
if (!file_exists($adminBuildDir)) {
|
||||
mkdir($adminBuildDir, 0777, true);
|
||||
file_put_contents(sprintf('%s/manifest.json', $adminBuildDir), '{}');
|
||||
}
|
||||
|
||||
if (!file_exists($shopBuildDir)) {
|
||||
mkdir($shopBuildDir, 0777, true);
|
||||
file_put_contents(sprintf('%s/manifest.json', $shopBuildDir), '{}');
|
||||
}
|
||||
}
|
||||
|
||||
private function startGroup(string $groupName): void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue