Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions ng-dev/release/publish/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,6 @@ export abstract class ReleaseAction {
...this.getAspectLockFiles(),
];

if (newVersion.patch === 0 && !newVersion.prerelease) {
// Switch the renovate labels for `target: rc` to `target: patch`
const renovateConfigPath = await updateRenovateConfigTargetLabels(
this.projectDir,
targetLabels['TARGET_RC'].name,
targetLabels['TARGET_PATCH'].name,
);

if (renovateConfigPath) {
filesToCommit.push(renovateConfigPath);
}
}

const commitMessage = getCommitMessageForRelease(newVersion);

// Create a release staging commit including changelog and version bump.
Expand Down Expand Up @@ -595,8 +582,21 @@ export abstract class ReleaseAction {

await this.prependReleaseNotesToChangelog(releaseNotes);

// Create a changelog cherry-pick commit.
await this.createCommit(commitMessage, [workspaceRelativeChangelogPath]);
const filesToCommit: string[] = [workspaceRelativeChangelogPath];
if (releaseNotes.version.patch === 0 && !releaseNotes.version.prerelease) {
// Switch the renovate labels for `target: rc` to `target: patch`
const renovateConfigPath = await updateRenovateConfigTargetLabels(
this.projectDir,
targetLabels['TARGET_RC'].name,
targetLabels['TARGET_PATCH'].name,
);

if (renovateConfigPath) {
filesToCommit.push(renovateConfigPath);
}
}

await this.createCommit(commitMessage, filesToCommit);
Log.info(green(` ✓ Created changelog cherry-pick commit for: "${releaseNotes.version}".`));

// Create a cherry-pick pull request that should be merged by the caretaker.
Expand Down