remove dependency for git at runtime
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules/
|
|||||||
bun.lockb
|
bun.lockb
|
||||||
todo.txt
|
todo.txt
|
||||||
proto.js
|
proto.js
|
||||||
.env
|
.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)
|
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
|
// Returns ISO 8601 Date & 24hr time for UTC-7/PDT
|
||||||
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0, 19).replace('T', ' ')
|
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0, 19).replace('T', ' ')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user