diff --git a/README.md b/README.md index 637f235..7b73800 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Open `deploy.php` and check the configuration, replace the example values Try to deploy to staging by running: - symfony php vendor/bin/deployer.phar deploy staging + symfony php vendor/bin/dep deploy stage=staging Log in through `ssh` on the dev-server and alter the `.env.local`-file to use the correct credentials. diff --git a/src/Skeleton/PostCreateProject.php b/src/Skeleton/PostCreateProject.php index 5746128..42dc3f7 100644 --- a/src/Skeleton/PostCreateProject.php +++ b/src/Skeleton/PostCreateProject.php @@ -67,11 +67,13 @@ private static function reconfigureApplication(Event $event): void file_put_contents($projectDir . '/config/packages/symfonycasts_sass.yaml', $content); $io->notice('→ Set up asset mapper with framework-core-bundle'); - file_put_contents( - $projectDir . '/config/packages/asset_mapper.yaml', - ' - vendor/sumocoders/framework-core-bundle/assets-public/', - FILE_APPEND + $content = file_get_contents($projectDir . '/config/packages/asset_mapper.yaml'); + $content = preg_replace( + '/(paths:(\r\n|\r|\n) +- assets\/(\r\n|\r|\n))/', + '$1 - vendor/sumocoders/framework-core-bundle/assets-public/' . PHP_EOL, + $content ); + file_put_contents($projectDir . '/config/packages/asset_mapper.yaml', $content); $io->notice('→ Reconfigure Twig'); $content = file_get_contents($projectDir . '/config/packages/twig.yaml');