Skip to content

Commit

Permalink
feat: fallback to root package version if package ignores github rele…
Browse files Browse the repository at this point in the history
…ase (#1935)

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
alex-enchi and chingor13 authored Sep 12, 2023
1 parent cc50a34 commit 0e11d4c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,34 @@ export class Manifest {
sha: foundTag.sha,
notes: '',
};
} else {
if (
strategiesByPath[ROOT_PROJECT_PATH] &&
this.repositoryConfig[path].skipGithubRelease
) {
this.logger.debug('could not find release, checking root package');
const rootComponent = await strategiesByPath[
ROOT_PROJECT_PATH
].getComponent();
const rootTag = new TagName(
expectedVersion,
rootComponent,
this.repositoryConfig[ROOT_PROJECT_PATH].tagSeparator,
this.repositoryConfig[ROOT_PROJECT_PATH].includeVInTag
);
const foundTag = allTags[rootTag.toString()];
if (foundTag) {
this.logger.debug(
`found rootTag: ${foundTag.name} ${foundTag.sha}`
);
releasesByPath[path] = {
name: foundTag.name,
tag: rootTag,
sha: foundTag.sha,
notes: '',
};
}
}
}
}
return releasesByPath;
Expand Down

0 comments on commit 0e11d4c

Please sign in to comment.