Skip to content

Commit 8638115

Browse files
committed
feat: make --only-base do the right thing
1 parent 54a266f commit 8638115

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/github.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ class Github {
353353
} else {
354354
const tree = await this.getSubPackageTree({ onlyBase });
355355
deps = Object.keys(tree);
356+
if (onlyBase) {
357+
deps = [];
358+
for (const k in tree) {
359+
if (tree[k].vias.includes('apache-superset')) {
360+
deps.push(k);
361+
}
362+
}
363+
}
356364
}
357365
if (shuffle) {
358366
deps = shuffleArray(deps);
@@ -492,12 +500,12 @@ class Github {
492500
await runShellCommand({ command: 'git clean -f', ...shellOptions });
493501
}
494502

495-
// Run pip-compile-multi
496503
let pythonPackages = [pythonPackage];
497504
if (includeSubpackages) {
498505
pythonPackages = await this.allDescendantPackages(pythonPackage);
499506
}
500507
console.log('Packages to bump', pythonPackages);
508+
// Run pip-compile-multi
501509
for (const lib of pythonPackages) {
502510
try {
503511
await runShellCommand({ command: `pip-compile-multi --use-cache -P ${lib}`, ...shellOptions });

src/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export function parsePinnedRequirementsTree(requirements) {
122122
.map((line) => line.trim().toLowerCase())
123123
.filter((line) => !line.startsWith('# via -r ')) // this removes funky lines refing other files
124124
.filter((line) => !line.startsWith('-e ')) // this removes funky lines refing other files
125+
.filter((line) => !line.includes('-r ')) // this removes funky lines refing other files
125126
.filter((line) => !!line); // this removes empty lines
126127

127128
const depsObject = {};

0 commit comments

Comments
 (0)