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), },