diff --git a/apps/web/scripts/gitInfo.mjs b/apps/web/scripts/gitInfo.mjs index 51ea7d5127..1e44da0847 100644 --- a/apps/web/scripts/gitInfo.mjs +++ b/apps/web/scripts/gitInfo.mjs @@ -27,15 +27,10 @@ const getGitVersion = () => { ); return null; } - const VERSION = execSync('git describe --always --dirty') - .toString() - // remove empty line - .replace(/[\s\r\n]+$/, ''); - - return VERSION; + return execSync('git describe --always --dirty').toString().trimEnd(); }; const getCommitHash = (rev = 'HEAD') => - execSync(`git rev-parse --short ${rev}`).toString(); + execSync(`git rev-parse --short ${rev}`).toString().trimEnd(); export { getCommitHash, getGitVersion };