Skip to content

Commit

Permalink
Merge pull request #250 from jolicode/hostnames
Browse files Browse the repository at this point in the history
Automatically replace hostnames in the README
  • Loading branch information
lyrixx authored Oct 25, 2023
2 parents 8730992 + 4b1e523 commit 9e4eac7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .castor/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ function init(): void
__FILE__,
]);
fs()->rename('README.dist.md', 'README.md');

$readMeContent = file_get_contents('README.md');
$urls = [variable('root_domain'), ...variable('extra_domains')];
$readMeContent = str_replace('<your hostnames>', implode(' ', $urls), $readMeContent);
file_put_contents('README.md', $readMeContent);
}

#[AsTask(description: 'Install Symfony')]
Expand Down

0 comments on commit 9e4eac7

Please sign in to comment.