16 lines
334 B
TypeScript
16 lines
334 B
TypeScript
import gitInfo from "../public/git-info.json";
|
|
|
|
/**
|
|
* Git utility to load commit hash in both development and production environments
|
|
*/
|
|
|
|
interface GitInfo {
|
|
commitHash: string;
|
|
buildTime: string;
|
|
}
|
|
|
|
let cachedGitInfo: GitInfo | null = null;
|
|
|
|
export async function getGitCommitInfo(): Promise<GitInfo> {
|
|
return gitInfo;
|
|
}
|