diff --git a/esbuild.js b/esbuild.js index b355042d9b0..c674ac6c20e 100644 --- a/esbuild.js +++ b/esbuild.js @@ -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 }