From ff60ff64efb23a632fd1502ca762c2439fbe3b85 Mon Sep 17 00:00:00 2001 From: rozetko Date: Wed, 21 Nov 2018 17:21:50 +0300 Subject: [PATCH] Shorten commit hash --- server/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/config.ts b/server/src/config.ts index ef6c23f..a9cfa2e 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -75,7 +75,7 @@ function getGitInfo() { const rev = fs.readFileSync(gitHeadFile).toString(); let branchPath = rev.indexOf(':') === -1 ? rev : rev.slice(5, -1); let branch = branchPath.split('/').pop(); - let commitHash = fs.readFileSync(`${gitRoot}/${branchPath}`).toString().slice(0, -1); + let commitHash = fs.readFileSync(`${gitRoot}/${branchPath}`).toString().slice(0, 7); return { branch, commitHash }; }