diff --git a/lib/init/src/index.ts b/lib/init/src/index.ts index ea92dff..8a2f649 100644 --- a/lib/init/src/index.ts +++ b/lib/init/src/index.ts @@ -49,7 +49,7 @@ function runCatching(fn: () => void) { // TODO(init): Move to use native module alert( // biome-ignore lint/style/useTemplate: I want this to be readable, thank you - `Failed to load Revenge (v: ${__BUILD_VERSION__} c: ${__BUILD_COMMIT__} e: ${__BUILD_ENV__})\n` + + `Failed to load Revenge (v: ${__BUILD_VERSION__} r: ${__BUILD_COMMIT__}-${__BUILD_BRANCH__}-${__BUILD_ENV__})\n` + `Discord: ${ClientInfoModule.Version} (${ClientInfoModule.Build})\n` + `Device: ${DeviceModule.deviceManufacturer} ${DeviceModule.deviceModel}\n\n` + getErrorStack(e), diff --git a/scripts/build.ts b/scripts/build.ts index 38d615c..41e2681 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -29,6 +29,7 @@ export default async function build(dev = false, log = true) { define: { __BUILD_VERSION__: JSON.stringify(pkg.version), __BUILD_COMMIT__: JSON.stringify((await $`git rev-parse HEAD`.text()).substring(0, 7)), + __BUILD_BRANCH__: JSON.stringify(await $`git rev-parse --abbrev-ref HEAD`.text()), __BUILD_ENV__: JSON.stringify(dev ? 'development' : 'production'), __BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: String(!dev), }, diff --git a/src/plugins/logging/index.ts b/src/plugins/logging/index.ts index 989b1dc..e2f6b67 100644 --- a/src/plugins/logging/index.ts +++ b/src/plugins/logging/index.ts @@ -24,7 +24,7 @@ registerPlugin( start({ logger }) { AppStartPerformance.mark('👊', 'Plugins start', performance.now() - tsInit) logger.log( - `👊 Revenge. Discord, your way. (v: ${__BUILD_VERSION__} c: ${__BUILD_COMMIT__} e: ${__BUILD_ENV__})`, + `👊 Revenge. Discord, your way. (v: ${__BUILD_VERSION__} r: ${__BUILD_COMMIT__}-${__BUILD_BRANCH__}-${__BUILD_ENV__})`, ) }, },