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
36/** Yargs command handler for staging a release. */
37async function handler(flags: Arguments<ReleasePublishOptions>) {
38 const git = await AuthenticatedGitClient.get();
39 const config = await getConfig();
40 assertValidReleaseConfig(config);
41 assertValidGithubConfig(config);
42
43 const task = new ReleaseTool(git, config.release, config.github, git.baseDir, flags);
44 const result = await task.run();
45
46 switch (result) {
47 case CompletionState.FATAL_ERROR:
48 Log.error(`Release action has been aborted due to fatal errors. See above.`);
49 process.exitCode = 2;
50 break;
51 case CompletionState.MANUALLY_ABORTED:
52 Log.info(yellow(`Release action has been manually aborted.`));
53 process.exitCode = 1;
54 break;
55 case CompletionState.SUCCESS:
56 Log.info(green(`Release action has completed successfully.`));
57 break;
58 }
59}
60
61/** CLI command module for publishing a release. */
62export const ReleasePublishCommandModule: CommandModule<{}, ReleasePublishOptions> = {

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