Skip to content

Commit

Permalink
feat(esbuild): add commit date to CocInfo (#3689)
Browse files Browse the repository at this point in the history
old: coc.nvim version: 0.0.80-ccd0b050
new: coc.nvim version: 0.0.80-ccd0b050 2022-03-08 15:06:47 +0800
  • Loading branch information
fannheyward authored Mar 9, 2022
1 parent 5b363b8 commit 5e2ecc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const fs = require('fs')
const path = require('path')
let revision = ''
try {
let res = cp.execSync('git rev-parse HEAD', {encoding: 'utf8'})
revision = res.trim().slice(0, 10)
let res = cp.execSync(`git log -1 --date=iso --pretty=format:'"%h","%ad"'`, {encoding: 'utf8'})
revision = res.replaceAll('"', '').replace(',', ' ')
} catch (e) {
// ignore
}
Expand Down

0 comments on commit 5e2ecc4

Please sign in to comment.