Skip to content

Commit

Permalink
In ReplaceFilesStep provide custom Iterator to skip VCS files removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustas Berneckas committed Sep 19, 2018
1 parent d75afcc commit 770e7fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 10.4.3
### Fixed
- In `ReplaceFilesStep` provide custom Iterator to skip VCS files removal.

## 10.4.2
### Fixed
- Fixed `file not found` warning when creating new package.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;

class ReplaceFilesStep implements ReleaseStepInterface
{
Expand All @@ -21,10 +22,15 @@ public function processStep(ReleaseStepData $releaseStepData, InputInterface $in
{
$output->writeln(sprintf('<info>*</info> Mirroring generated files to source repository...'));

$iterator = Finder::create()
->in($releaseStepData->getSourceDir())
->getIterator()
;

$this->filesystem->mirror(
$releaseStepData->getGeneratedDir(),
$releaseStepData->getSourceDir(),
null,
$iterator,
[
'delete' => true,
'override' => true,
Expand Down

0 comments on commit 770e7fe

Please sign in to comment.