Skip to content

Commit

Permalink
feat: make --only-base do the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Nov 26, 2024
1 parent 54a266f commit 8638115
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ class Github {
} else {
const tree = await this.getSubPackageTree({ onlyBase });
deps = Object.keys(tree);
if (onlyBase) {
deps = [];
for (const k in tree) {
if (tree[k].vias.includes('apache-superset')) {
deps.push(k);
}
}
}
}
if (shuffle) {
deps = shuffleArray(deps);
Expand Down Expand Up @@ -492,12 +500,12 @@ class Github {
await runShellCommand({ command: 'git clean -f', ...shellOptions });
}

// Run pip-compile-multi
let pythonPackages = [pythonPackage];
if (includeSubpackages) {
pythonPackages = await this.allDescendantPackages(pythonPackage);
}
console.log('Packages to bump', pythonPackages);
// Run pip-compile-multi
for (const lib of pythonPackages) {
try {
await runShellCommand({ command: `pip-compile-multi --use-cache -P ${lib}`, ...shellOptions });
Expand Down
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export function parsePinnedRequirementsTree(requirements) {
.map((line) => line.trim().toLowerCase())
.filter((line) => !line.startsWith('# via -r ')) // this removes funky lines refing other files
.filter((line) => !line.startsWith('-e ')) // this removes funky lines refing other files
.filter((line) => !line.includes('-r ')) // this removes funky lines refing other files
.filter((line) => !!line); // this removes empty lines

const depsObject = {};
Expand Down

0 comments on commit 8638115

Please sign in to comment.