Skip to content

Commit

Permalink
Merge pull request #71 from bfeaver/fix-ignore-dot-files
Browse files Browse the repository at this point in the history
Fix not ignoring dot files
  • Loading branch information
Elendev authored Aug 15, 2024
2 parents 665ef86 + 8518aac commit 01dddda
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/PushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->configuration->getVersion(),
$subdirectory,
$ignoredDirectories,
$input->getOption('keep-dot-files'),
$this->getIO()
);

Expand Down
20 changes: 20 additions & 0 deletions tests/ZipArchiverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ public function testArchiveDirectory(string $directory, array $expectedResult, s
$this->assertArchiveContainsFiles($this->generationPath, $expectedResult);
}

/**
* @dataProvider zipArchiverProvider
*/
public function testArchiveDirectoryWithDotFiles(string $directory, array $expectedResult, string $subdirectory = null, array $ignore = [])
{
$expectedResult[] = $subdirectory !== null ? $subdirectory . '/.foo/foo.txt' : '.foo/foo.txt';

ZipArchiver::archiveDirectory(
$directory,
$this->generationPath,
'0.0.1',
$subdirectory,
$ignore,
true
);


$this->assertArchiveContainsFiles($this->generationPath, $expectedResult);
}

public static function zipArchiverProvider() {
return [
[
Expand Down
Empty file.

0 comments on commit 01dddda

Please sign in to comment.