mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
31 lines
678 B
JavaScript
31 lines
678 B
JavaScript
const process = require('child_process')
|
|
const commonMeta = require('../src/client/common.meta.json')
|
|
|
|
const commitHash = process
|
|
.execSync('git rev-parse HEAD')
|
|
.toString()
|
|
.trim()
|
|
const branch = process
|
|
.execSync('git rev-parse --abbrev-ref HEAD')
|
|
.toString()
|
|
.trim()
|
|
const nearestTag = process
|
|
.execSync('git describe --abbrev=0 --tags --always')
|
|
.toString()
|
|
.trim()
|
|
const versionWithTag = process
|
|
.execSync('git describe --tags --always')
|
|
.toString()
|
|
.trim()
|
|
const compilationInfo = {
|
|
commitHash,
|
|
branch,
|
|
version: commonMeta.version,
|
|
nearestTag,
|
|
versionWithTag,
|
|
// buildTime: Number(new Date()),
|
|
}
|
|
module.exports = {
|
|
compilationInfo,
|
|
}
|