MCPcopy Create free account
hub / github.com/monkeytypegame/monkeytype / getVersion

Function getVersion

backend/src/version.ts:23–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23function getVersion(): string {
24 if (isDevEnvironment()) {
25 return "DEVELOPMENT-VERSION";
26 }
27
28 if (existsSync(SERVER_VERSION_FILE_PATH)) {
29 return readFileSync(SERVER_VERSION_FILE_PATH, "utf-8");
30 }
31
32 const serverVersion = `${getDateVersion()}_${COMMIT_HASH}`;
33 writeFileSync(SERVER_VERSION_FILE_PATH, serverVersion);
34
35 return serverVersion;
36}
37
38export const version = getVersion();

Callers 3

getVersionTextFunction · 0.85
showNewIndicatorFunction · 0.85
version.tsFile · 0.85

Calls 2

isDevEnvironmentFunction · 0.90
getDateVersionFunction · 0.85

Tested by

no test coverage detected