This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/projects/backend/src/common/app-utils.ts
2024-10-08 15:32:02 +01:00

11 lines
303 B
TypeScript

/**
* Gets the app version.
*/
export function getAppVersion() {
if (!process.env.APP_VERSION) {
const packageJson = require("../../package.json");
process.env.APP_VERSION = packageJson.version;
}
return process.env.APP_VERSION + "-" + (process.env.GIT_REV?.substring(0, 7) ?? "dev");
}