diff --git a/src/PushCommand.php b/src/PushCommand.php index 0c973a0..97b93e0 100644 --- a/src/PushCommand.php +++ b/src/PushCommand.php @@ -132,6 +132,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->configuration->getVersion(), $subdirectory, $ignoredDirectories, + $input->getOption('keep-dot-files'), $this->getIO() ); diff --git a/tests/ZipArchiverTest.php b/tests/ZipArchiverTest.php index d695bd9..4f7a509 100644 --- a/tests/ZipArchiverTest.php +++ b/tests/ZipArchiverTest.php @@ -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 [ [ diff --git a/tests/ZipArchiverTest/TypicalArchive/.foo/foo.txt b/tests/ZipArchiverTest/TypicalArchive/.foo/foo.txt new file mode 100644 index 0000000..e69de29