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

Function getCurrentSha

ng-dev/release/stamping/env-stamp.ts:86–92  ·  view source on GitHub ↗

Get the current SHA of HEAD.

(git: GitClient)

Source from the content-addressed store, hash-verified

84
85/** Get the current SHA of HEAD. */
86function getCurrentSha(git: GitClient) {
87 try {
88 return git.run(['rev-parse', 'HEAD']).stdout.trim();
89 } catch {
90 return '';
91 }
92}
93
94/** Get the current abbreviated SHA of HEAD. */
95function getCurrentAbbrevSha(git: GitClient) {

Callers 2

printEnvStampFunction · 0.85
getSCMVersionsFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected