cobalt/src/modules/sub/currentCommit.js
wukko c0289b6a8c basically new readme and more languages
- indonesian localization by @LyfeV
- rewrote readme
- added new line at the end for files that were missing it
2022-08-01 21:48:37 +06:00

11 lines
386 B
JavaScript

import { execSync } from "child_process";
export function shortCommit() {
return execSync('git rev-parse --short HEAD').toString().trim()
}
export function getCommitInfo() {
let d = execSync(`git show -s --format='%s;;;%B'`).toString().trim().replace(/[\r\n]/gm, '\n').split(';;;')
d[1] = d[1].replace(d[0], '').trim().toString().replace(/[\r\n]/gm, '<br>')
return d
}