Skip to content

Commit c9967e3

Browse files
author
Slavey Karadzhov
committed
appdir.includes is respected also for libraries.
Related to #70.
1 parent 7250f24 commit c9967e3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

module/Client/src/Client/Service/ZpkInvokable.php

-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ public function pack($sourceFolder, $destinationFolder=".", $fileName=null, arra
304304
// Get the include map
305305
$includeMap = array();
306306
if ($type == self::TYPE_LIBRARY) {
307-
// Include all files and folders for the library
308-
$properties['appdir.includes'] = array_diff(scandir($sourceFolder), array('.','..','deployment.properties'));
309307
$appDir = '';
310308
}
311309
$includeMap['appdir'] = $this->getAppPaths($appDir, $properties['appdir.includes']);

module/Client/tests/ClientTest/Service/ZpkInvokablePackTest.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ public function testLibraryPack()
5353
{
5454
$this->zpkService->updateMeta($this->tempDir, array('type'=>'library'));
5555

56+
// Remove SubDir from the included directories
57+
$propContent = file_get_contents($this->tempDir.'/deployment.properties');
58+
$propContent = str_replace('SubDir,\\', 'public,\\', $propContent);
59+
file_put_contents($this->tempDir.'/deployment.properties', $propContent);
60+
5661
$zpkPath = $this->zpkService->pack($this->tempDir, $this->tempDir);
5762
$zpkFiles = $this->getZpkEntriesRecursively($zpkPath);
5863

5964
$actual = array_keys($zpkFiles);
6065
$expected = array(
6166
'deployment.xml',
62-
'SubDir/SubSubDir/Test.php',
6367
'/EmptyDir/',
6468
'public/.htaccess',
6569
'composer.json',

0 commit comments

Comments
 (0)