Introduce optional gitCommitInfo as app-wide metadata.

This change adds an optional `gitCommitInfo` string to the app state,
which, if set by the GET_COMMIT_INFO environment variable when the
application is launched, will be displayed in the /about section. 

The `start.sh` and `build_package.sh` scripts set `GET_COMMIT_INFO` to
the most recent git commit's short hash if known, appending the string
"(local modifications)" if additional changes are detected beyond that
point.
This commit is contained in:
DeWitt Clinton
2025-05-27 08:17:40 -07:00
parent b3f52e215a
commit 43370ab0c5
8 changed files with 51 additions and 1 deletions
+2
View File
@@ -68,12 +68,14 @@ async function main() {
const readUpResult = await readPackageUp({ cwd: __dirname });
const cliVersion =
process.env.CLI_VERSION || readUpResult?.packageJson.version || 'unknown';
const gitCommitInfo = process.env.GIT_COMMIT_INFO || 'N/A';
render(
React.createElement(App, {
config,
settings,
cliVersion,
gitCommitInfo,
startupWarnings,
}),
);