diff --git a/tools/git-version.js b/tools/git-version.js index 45365fda6..f5bd6aed8 100644 --- a/tools/git-version.js +++ b/tools/git-version.js @@ -1,6 +1,6 @@ // inspired by: https://stackoverflow.com/questions/42155115/how-to-include-git-revision-into-angular-cli-application -// const fs = require('fs'); +const fs = require('fs'); // const { exec, execSync } = require('child_process'); // const revision = process.env.execSync('git rev-parse --short HEAD').toString().trim(); // const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim(); @@ -11,7 +11,7 @@ const branch = process.env.GITHUB_SHA || 'NO_BRANCH'; const content = `// this file is automatically generated by git.version.ts script export const versions = { - version: '${process.env.npm_package_version}', + version: '${version}', revision: '${revision}', branch: '${branch}', };