diff --git a/index.js b/index.js index e0b2a20..3e35fb1 100644 --- a/index.js +++ b/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',' ') diff --git a/routes/frontpage.js b/routes/frontpage.js index 802f964..c47b9b3 100644 --- a/routes/frontpage.js +++ b/routes/frontpage.js @@ -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 {