Skip to content

Commit

Permalink
fix(promote action): exclude legacy all architecture in base proces…
Browse files Browse the repository at this point in the history
…sing (#153)
  • Loading branch information
jneo8 authored Jan 9, 2025
1 parent 3952f8f commit 3d1aae2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/promote-charm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42519,7 +42519,10 @@ class PromoteCharmAction {
}
getRevisions(name, track, channel, bases) {
return __awaiter(this, void 0, void 0, function* () {
return Promise.all(bases.map((base) => __awaiter(this, void 0, void 0, function* () {
// Filter out bases with architecture "all"
const filteredBases = bases.filter((base) => base.architecture !== 'all');
// Map filtered bases to their revision information
return Promise.all(filteredBases.map((base) => __awaiter(this, void 0, void 0, function* () {
return this.charmcraft.getRevisionInfoFromChannelJson(name, track, channel, base);
})));
});
Expand Down
6 changes: 5 additions & 1 deletion src/actions/promote-charm/promote-charm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ export class PromoteCharmAction {
channel: string,
bases: Base[],
): Promise<RevisionResourceInfo[]> {
// Filter out bases with architecture "all"
const filteredBases = bases.filter((base) => base.architecture !== 'all');

// Map filtered bases to their revision information
return Promise.all(
bases.map(async (base: Base) =>
filteredBases.map(async (base: Base) =>
this.charmcraft.getRevisionInfoFromChannelJson(
name,
track,
Expand Down

0 comments on commit 3d1aae2

Please sign in to comment.