mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
19 lines
449 B
TypeScript
19 lines
449 B
TypeScript
import process from 'child_process'
|
|
|
|
export const commitHash = process
|
|
.execSync('git rev-parse HEAD')
|
|
.toString()
|
|
.trim()
|
|
export const branch = process
|
|
.execSync('git rev-parse --abbrev-ref HEAD')
|
|
.toString()
|
|
.trim()
|
|
export const nearestTag = process
|
|
.execSync('git describe --abbrev=0 --tags --always')
|
|
.toString()
|
|
.trim()
|
|
export const versionWithTag = process
|
|
.execSync('git describe --tags --always')
|
|
.toString()
|
|
.trim()
|