Skip to content

Commit

Permalink
fix: linked-versions + includeComponentInTag=false should work
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 14, 2022
1 parent 7ebb59e commit 60dcc6a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/manifest-releaser.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ Example:
},
{
"type": "linked-versions",
"group-name": "my group",
"groupName": "my group",
"components": [
"pkgA", "pkgB"
]
Expand Down
10 changes: 9 additions & 1 deletion src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,15 @@ export class Manifest {
continue;
}
const component = tagName.component || DEFAULT_COMPONENT_NAME;
const path = pathsByComponent[component];
let path = pathsByComponent[component];
if (!path) {
for (const p in this.repositoryConfig) {
if (!this.repositoryConfig[p].includeComponentInTag) {
path = p;
break;
}
}
}
if (!path) {
this.logger.warn(
`Found release tag with component '${component}', but not configured in manifest`
Expand Down
3 changes: 0 additions & 3 deletions src/strategies/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ export abstract class BaseStrategy implements Strategy {
* @returns {string}
*/
async getComponent(): Promise<string | undefined> {
if (!this.includeComponentInTag) {
return '';
}
return this.component || (await this.getDefaultComponent());
}

Expand Down

0 comments on commit 60dcc6a

Please sign in to comment.