change how verison identifier works
This commit is contained in:
2
index.js
2
index.js
@@ -18,7 +18,7 @@ const globalConfig = await fetch(`${process.env.API_DBHOST}/config/${process.env
|
||||
return response.json()
|
||||
}
|
||||
})
|
||||
const globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
||||
var globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
||||
// Returns ISO 8601 Date & 24hr time for UTC-7/PDT
|
||||
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0,19).replace('T',' ')
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ app.post("/api/sync", (rreq,rres) => {
|
||||
rres.sendStatus(200)
|
||||
} else if (rreq.headers["x-github-event"] == "push") {
|
||||
execSync("git pull")
|
||||
globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
||||
logRequest(rres,rreq,200,"Ran git pull")
|
||||
rres.sendStatus(200)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user