feat: add version to startup logs

This commit is contained in:
sct
2020-12-16 03:54:32 +00:00
parent df4ac8361f
commit 2948f9360e
3 changed files with 17 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
export const getAppVersion = (): string => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { version } = require('../../package.json');
let finalVersion = version;
if (version === '0.1.0') {
finalVersion = `develop-${process.env.COMMIT_TAG ?? 'local'}`;
}
return finalVersion;
};