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

Function handler

ng-dev/release/publish/cli.ts:37–59  ·  view source on GitHub ↗

Yargs command handler for staging a release.

(flags: Arguments<ReleasePublishOptions>)

Source from the content-addressed store, hash-verified

35 type: 'boolean',
36 default: false,
37 description:
38 'Only stage the release (bump version, generate changelog, build, precheck, create PR) and exit.',
39 });
40}
41
42/** Yargs command handler for staging a release. */
43async function handler(flags: Arguments<ReleasePublishOptions>) {
44 const git = await AuthenticatedGitClient.get();
45 const config = await getConfig();
46 assertValidReleaseConfig(config);
47 assertValidGithubConfig(config);
48
49 const task = new ReleaseTool(git, config.release, config.github, git.baseDir, flags);
50 const result = await task.run();
51
52 switch (result) {
53 case CompletionState.FATAL_ERROR:
54 Log.error(`Release action has been aborted due to fatal errors. See above.`);
55 process.exitCode = 2;
56 break;
57 case CompletionState.MANUALLY_ABORTED:
58 Log.info(yellow(`Release action has been manually aborted.`));
59 process.exitCode = 1;
60 break;
61 case CompletionState.SUCCESS:
62 Log.info(green(`Release action has completed successfully.`));

Callers

nothing calls this directly

Calls 6

runMethod · 0.95
getConfigFunction · 0.85
assertValidReleaseConfigFunction · 0.85
assertValidGithubConfigFunction · 0.85
getMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected