getCommitFromCurrentBuild() — react Function Reference
Architecture documentation for the getCommitFromCurrentBuild() function in utils.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3f9b132b_fecb_d775_cc26_7dc5a21d12a1["getCommitFromCurrentBuild()"] 9ef9efb0_edfe_575a_20d0_9f1277d0f69a["utils.js"] 3f9b132b_fecb_d775_cc26_7dc5a21d12a1 -->|defined in| 9ef9efb0_edfe_575a_20d0_9f1277d0f69a ee8bb3a3_e4f8_c762_02f7_80b9a58ab38c["extractCommitFromVersionNumber()"] 3f9b132b_fecb_d775_cc26_7dc5a21d12a1 -->|calls| ee8bb3a3_e4f8_c762_02f7_80b9a58ab38c style 3f9b132b_fecb_d775_cc26_7dc5a21d12a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/release/utils.js lines 111–138
const getCommitFromCurrentBuild = async () => {
const cwd = join(__dirname, '..', '..');
// If this build includes a build-info.json file, extract the commit from it.
// Otherwise fall back to parsing from the package version number.
// This is important to make the build reproducible (e.g. by Mozilla reviewers).
const buildInfoJSON = join(
cwd,
'build',
'oss-experimental',
'react',
'build-info.json'
);
if (existsSync(buildInfoJSON)) {
const buildInfo = await readJson(buildInfoJSON);
return buildInfo.commit;
} else {
const packageJSON = join(
cwd,
'build',
'oss-experimental',
'react',
'package.json'
);
const {version} = await readJson(packageJSON);
return extractCommitFromVersionNumber(version);
}
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getCommitFromCurrentBuild() do?
getCommitFromCurrentBuild() is a function in the react codebase, defined in scripts/release/utils.js.
Where is getCommitFromCurrentBuild() defined?
getCommitFromCurrentBuild() is defined in scripts/release/utils.js at line 111.
What does getCommitFromCurrentBuild() call?
getCommitFromCurrentBuild() calls 1 function(s): extractCommitFromVersionNumber.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free