Public Access
fix(package): only zip sub-extensions listed in package manifest (#300)
Universal: Sync Feature Branch Versions / Sync feature branches with dev (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 12s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 13s
Platform: mokoplatform CI / Gate 1: Code Quality (push) Failing after 46s
Platform: mokoplatform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: mokoplatform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: mokoplatform CI / Gate 4: Governance (push) Has been cancelled
Platform: mokoplatform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: mokoplatform CI / CI Summary (push) Has been cancelled
Universal: Sync Feature Branch Versions / Sync feature branches with dev (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 12s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 13s
Platform: mokoplatform CI / Gate 1: Code Quality (push) Failing after 46s
Platform: mokoplatform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: mokoplatform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: mokoplatform CI / Gate 4: Governance (push) Has been cancelled
Platform: mokoplatform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: mokoplatform CI / CI Summary (push) Has been cancelled
release_package.php was globbing ALL directories under packages/, including ones removed from the manifest (backup, license, dbip). Now parses pkg_*.xml to build allowlist and skips unlisted dirs.
This commit is contained in:
@@ -224,9 +224,30 @@ class ReleasePackageCli extends CliFramework
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Only zip sub-extensions listed in the package manifest
|
||||
$manifestedSubs = [];
|
||||
$pkgManifestFiles = glob("{$sourceDir}/pkg_*.xml") ?: [];
|
||||
foreach ($pkgManifestFiles as $pmf) {
|
||||
$pmXml = @simplexml_load_file($pmf);
|
||||
if ($pmXml && isset($pmXml->files)) {
|
||||
foreach ($pmXml->files->file as $fileNode) {
|
||||
$zipName = pathinfo((string) $fileNode, PATHINFO_FILENAME);
|
||||
if (!empty($zipName)) {
|
||||
$manifestedSubs[$zipName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$packageDirs = glob("{$sourceDir}/packages/*", GLOB_ONLYDIR) ?: [];
|
||||
foreach ($packageDirs as $pkgDir) {
|
||||
$subName = basename($pkgDir);
|
||||
|
||||
// Skip directories not listed in the package manifest
|
||||
if (!empty($manifestedSubs) && !isset($manifestedSubs[$subName])) {
|
||||
echo " Skipping {$subName} (not in package manifest)\n";
|
||||
continue;
|
||||
}
|
||||
$subZipPath = "{$outputDir}/{$subName}.zip";
|
||||
|
||||
// If sub-package is a full repo checkout (e.g. git submodule),
|
||||
|
||||
Reference in New Issue
Block a user