MCPcopy Create free account
hub / github.com/angular/dev-infra / CutNewPatchAction

Class CutNewPatchAction

ng-dev/release/publish/actions/cut-new-patch.ts:18–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 * for the new patch version, but also needs to be cherry-picked into the next development branch.
17 */
18export class CutNewPatchAction extends ReleaseAction {
19 private _previousVersion = this.active.latest.version;
20 private _newVersion = semverInc(this._previousVersion, 'patch');
21
22 override async getDescription() {
23 const {branchName} = this.active.latest;
24 const newVersion = this._newVersion;
25 return `Cut a new patch release for the "${branchName}" branch (v${newVersion}).`;
26 }
27
28 override async perform() {
29 const {branchName} = this.active.latest;
30 const newVersion = this._newVersion;
31 const compareVersionForReleaseNotes = this._previousVersion;
32
33 const {pullRequest, releaseNotes, builtPackagesWithInfo, beforeStagingSha} =
34 await this.checkoutBranchAndStageVersion(
35 newVersion,
36 compareVersionForReleaseNotes,
37 branchName,
38 );
39
40 await this.promptAndWaitForPullRequestMerged(pullRequest);
41 await this.publish(
42 builtPackagesWithInfo,
43 releaseNotes,
44 beforeStagingSha,
45 branchName,
46 'latest',
47 {showAsLatestOnGitHub: true},
48 );
49 await this.cherryPickChangelogIntoNextBranch(releaseNotes, branchName);
50 }
51
52 static override async isActive(_active: ActiveReleaseTrains) {
53 // Patch versions can be cut at any time. See:
54 // https://hackmd.io/2Le8leq0S6G_R5VEVTNK9A#Release-prompt-options.
55 return true;
56 }
57}

Callers

nothing calls this directly

Calls 1

semverIncFunction · 0.85

Tested by

no test coverage detected