Skip to content

Commit ac478a5

Browse files
committed
feat(capabilities): Extract core capabilities from OC
Signed-off-by: provokateurin <[email protected]>
1 parent 5379789 commit ac478a5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

generate-spec

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,20 @@ if (file_exists($definitionsPath)) {
159159

160160
$capabilities = null;
161161
$publicCapabilities = null;
162-
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($sourceDir));
163162
$capabilitiesFiles = [];
164-
foreach ($iterator as $file) {
165-
$path = $file->getPathname();
166-
if (!str_ends_with($path, ".php")) {
167-
continue;
163+
$capabilitiesDirs = [$sourceDir];
164+
if ($appIsCore) {
165+
$capabilitiesDirs[] = $sourceDir . '/../lib/private';
166+
}
167+
foreach ($capabilitiesDirs as $dir) {
168+
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
169+
foreach ($iterator as $file) {
170+
$path = $file->getPathname();
171+
if (!str_ends_with($path, ".php")) {
172+
continue;
173+
}
174+
$capabilitiesFiles[] = $path;
168175
}
169-
$capabilitiesFiles[] = $path;
170176
}
171177
sort($capabilitiesFiles);
172178
foreach ($capabilitiesFiles as $path) {

0 commit comments

Comments
 (0)