remove dependency for git at runtime

This commit is contained in:
2025-12-27 13:45:13 -08:00
parent 0c5c8d23db
commit 2415125010
2 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ bun.lockb
todo.txt
proto.js
.env
VERSION

View File

@@ -22,7 +22,15 @@ const globalConfig = await db`select content from config where id = ${process.en
process.exit(1)
})
const globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
function readVersion() {
try {
return fs.readFileSync('./VERSION', 'utf-8').split(" ")[0]
} catch {
return "00MIAU"
}
}
const globalVersion = readVersion()
// Returns ISO 8601 Date & 24hr time for UTC-7/PDT
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0, 19).replace('T', ' ')