fix: footer date in edgeone without cloudflare env

This commit is contained in:
YunYouJun
2025-08-17 03:28:50 +08:00
parent 13b6ad6047
commit 6095d97b2a
7 changed files with 56 additions and 18 deletions

17
scripts/git.ts Normal file
View File

@@ -0,0 +1,17 @@
import { simpleGit } from 'simple-git'
const git = simpleGit()
/**
* get git repo latest commit
*/
export async function getLatestCommit() {
try {
const log = await git.log({ maxCount: 1 })
return log.latest
}
catch (error) {
console.error('Error fetching latest commit:', error)
return null
}
}