mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复版本信息展示
This commit is contained in:
parent
7038e15ad2
commit
cd3eab5d35
|
@ -25,13 +25,15 @@ export default (app: Router) => {
|
|||
const currentVersionFile = fs.readFileSync(config.versionFile, 'utf8');
|
||||
const version = currentVersionFile.match(versionRegx)![1];
|
||||
const lastCommitTime = (
|
||||
await promiseExec('git show -s --format=%ai')
|
||||
await promiseExec(`cd ${config.rootPath} && git show -s --format=%ai`)
|
||||
).replace('\n', '');
|
||||
const lastCommitId = (
|
||||
await promiseExec('git rev-parse --short HEAD')
|
||||
await promiseExec(`cd ${config.rootPath} && git rev-parse --short HEAD`)
|
||||
).replace('\n', '');
|
||||
const branch = (
|
||||
await promiseExec('git symbolic-ref --short HEAD')
|
||||
await promiseExec(
|
||||
`cd ${config.rootPath} && git symbolic-ref --short HEAD`,
|
||||
)
|
||||
).replace('\n', '');
|
||||
|
||||
let isInitialized = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user