remove dependency for git at runtime
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ bun.lockb
|
||||
todo.txt
|
||||
proto.js
|
||||
.env
|
||||
VERSION
|
||||
10
index.js
10
index.js
@@ -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', ' ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user