Skip to content

Commit

Permalink
Merge pull request #629 from greg0ire/copy-everything
Browse files Browse the repository at this point in the history
fix: copy more than just rst files
  • Loading branch information
SenseException authored Oct 16, 2024
2 parents f6f0654 + d60535b commit f590d01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/Docs/RST/RSTCopier.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use function file_exists;
use function is_string;
use function preg_replace;
use function str_ends_with;
use function str_replace;

/** @final */
Expand Down Expand Up @@ -55,6 +56,11 @@ public function copyRst(Project $project, ProjectVersion $version): void
continue;
}

if (! str_ends_with($file, '.rst')) {
$this->filesystem->copy($file, $outputPath . str_replace($language->getPath(), '', $file));
continue;
}

$this->copyFile(
$project,
$version,
Expand Down
2 changes: 1 addition & 1 deletion lib/Docs/RST/RSTFileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getSourceFiles(string $path): array

$finder = $this->getFilesFinder($path);

$finder->name('*.rst');
$finder->name('*.*');
$finder->notName('toc.rst');

return $this->finderToArray($finder);
Expand Down

0 comments on commit f590d01

Please sign in to comment.