feat: implement build version check and update build info handling

This commit is contained in:
2026-02-25 15:53:00 +00:00
parent f6f565bbcb
commit e13e696253
10 changed files with 186 additions and 66 deletions

View File

@@ -1,4 +1,5 @@
const release = "__PROJECT__.dirty"
const { gitHash, buildTime } = require("./lib/buildInfo")
const release = gitHash // overwritten by CI with PROJECT_RELEASE (Sentry-Release-String)
const originURL = "https://__PROJECT__.code.testversion.online"
const apiClientBaseURL = "/api/"
@@ -8,10 +9,12 @@ const cryptchaSiteId = "6628f06a0938460001505119"
// @ts-ignore
if (release && typeof context !== "undefined") {
context.response.header("X-Release", release)
context.response.header("X-Build-Time", buildTime)
}
module.exports = {
release,
buildTime,
apiClientBaseURL,
cryptchaSiteId,
originURL,