mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +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 currentVersionFile = fs.readFileSync(config.versionFile, 'utf8');
|
||||||
const version = currentVersionFile.match(versionRegx)![1];
|
const version = currentVersionFile.match(versionRegx)![1];
|
||||||
const lastCommitTime = (
|
const lastCommitTime = (
|
||||||
await promiseExec('git show -s --format=%ai')
|
await promiseExec(`cd ${config.rootPath} && git show -s --format=%ai`)
|
||||||
).replace('\n', '');
|
).replace('\n', '');
|
||||||
const lastCommitId = (
|
const lastCommitId = (
|
||||||
await promiseExec('git rev-parse --short HEAD')
|
await promiseExec(`cd ${config.rootPath} && git rev-parse --short HEAD`)
|
||||||
).replace('\n', '');
|
).replace('\n', '');
|
||||||
const branch = (
|
const branch = (
|
||||||
await promiseExec('git symbolic-ref --short HEAD')
|
await promiseExec(
|
||||||
|
`cd ${config.rootPath} && git symbolic-ref --short HEAD`,
|
||||||
|
)
|
||||||
).replace('\n', '');
|
).replace('\n', '');
|
||||||
|
|
||||||
let isInitialized = true;
|
let isInitialized = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user