From 0e11d4c019f1e33cd713a237e037f31397d5371a Mon Sep 17 00:00:00 2001 From: Alex K Date: Tue, 12 Sep 2023 23:46:45 +0200 Subject: [PATCH] feat: fallback to root package version if package ignores github release (#1935) Co-authored-by: Jeff Ching --- src/manifest.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/manifest.ts b/src/manifest.ts index ec2bb80fb..54c539525 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -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;