From cbc39e38b426fed5c9390e460475d913dbe86897 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Thu, 1 May 2025 18:54:58 +0700 Subject: [PATCH] fix(scripts/build): trim some build globals --- scripts/build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build.ts b/scripts/build.ts index 41e2681..52f5d25 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -28,8 +28,8 @@ 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_COMMIT__: JSON.stringify((await $`git rev-parse HEAD`.text()).trim().substring(0, 7)), + __BUILD_BRANCH__: JSON.stringify((await $`git rev-parse --abbrev-ref HEAD`.text()).trim()), __BUILD_ENV__: JSON.stringify(dev ? 'development' : 'production'), __BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: String(!dev), },