From d13f2082153093bc2bbadfdc4b14d723b53f882c Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 27 Apr 2024 10:15:59 +0700 Subject: [PATCH] Fix not updating SCRIPT_VERSION variable --- build.ts | 3 ++- src/utils/global.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.ts b/build.ts index 43de2b1..69e5901 100644 --- a/build.ts +++ b/build.ts @@ -27,7 +27,7 @@ const postProcess = (str: string): string => { return str; } -const build = async (target: BuildTarget, version, config: any={}) => { +const build = async (target: BuildTarget, version: string, config: any={}) => { console.log('-- Target:', target); const startTime = performance.now(); @@ -47,6 +47,7 @@ const build = async (target: BuildTarget, version, config: any={}) => { naming: outputScriptName, define: { 'Bun.env.BUILD_TARGET': JSON.stringify(target), + 'Bun.env.SCRIPT_VERSION': JSON.stringify(version), }, }); diff --git a/src/utils/global.ts b/src/utils/global.ts index bbe8fa6..d9b0985 100644 --- a/src/utils/global.ts +++ b/src/utils/global.ts @@ -1,3 +1,6 @@ +export const SCRIPT_VERSION = Bun.env.SCRIPT_VERSION; +export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud'; + export const AppInterface = window.AppInterface; export const NATIVE_FETCH = window.fetch; export const STATES: BxStates = { @@ -9,6 +12,3 @@ export const STATES: BxStates = { currentStream: {}, remotePlay: {}, }; - -export const SCRIPT_VERSION = '3.5.3'; -export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';