fix(scripts/build): trim some build globals

This commit is contained in:
PalmDevs 2025-05-01 18:54:58 +07:00
parent 058371988a
commit cbc39e38b4
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

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