mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 11:56:08 +08:00
修复获取最后commit时间
This commit is contained in:
parent
cd3eab5d35
commit
40bc25ed5f
|
@ -25,7 +25,7 @@ export default (app: Router) => {
|
||||||
const currentVersionFile = fs.readFileSync(config.versionFile, 'utf8');
|
const currentVersionFile = fs.readFileSync(config.versionFile, 'utf8');
|
||||||
const version = currentVersionFile.match(versionRegx)![1];
|
const version = currentVersionFile.match(versionRegx)![1];
|
||||||
const lastCommitTime = (
|
const lastCommitTime = (
|
||||||
await promiseExec(`cd ${config.rootPath} && git show -s --format=%ai`)
|
await promiseExec(`cd ${config.rootPath} && git show -s --format=%ai | head -1`)
|
||||||
).replace('\n', '');
|
).replace('\n', '');
|
||||||
const lastCommitId = (
|
const lastCommitId = (
|
||||||
await promiseExec(`cd ${config.rootPath} && git rev-parse --short HEAD`)
|
await promiseExec(`cd ${config.rootPath} && git rev-parse --short HEAD`)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user