From 9342d76f61c8ecc7cda9fb76a83936da9f50001a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Mon, 21 Mar 2022 16:06:48 +0100 Subject: [PATCH] fix regular builds --- build/azure-pipelines/common/createBuild.js | 6 +++--- build/azure-pipelines/common/createBuild.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines/common/createBuild.js b/build/azure-pipelines/common/createBuild.js index 3f56a717fbe..57bb87fedcf 100644 --- a/build/azure-pipelines/common/createBuild.js +++ b/build/azure-pipelines/common/createBuild.js @@ -21,9 +21,9 @@ function getEnv(name) { async function main() { const [, , _version] = process.argv; const quality = getEnv('VSCODE_QUALITY'); - const commit = process.env['VSCODE_DISTRO_COMMIT'] || getEnv('BUILD_SOURCEVERSION'); + const commit = process.env['VSCODE_DISTRO_COMMIT']?.trim() || getEnv('BUILD_SOURCEVERSION'); const queuedBy = getEnv('BUILD_QUEUEDBY'); - const sourceBranch = process.env['VSCODE_DISTRO_REF'] || getEnv('BUILD_SOURCEBRANCH'); + const sourceBranch = process.env['VSCODE_DISTRO_REF']?.trim() || getEnv('BUILD_SOURCEBRANCH'); const version = _version + (quality === 'stable' ? '' : `-${quality}`); console.log('Creating build...'); console.log('Quality:', quality); @@ -34,7 +34,7 @@ async function main() { timestamp: (new Date()).getTime(), version, isReleased: false, - private: Boolean(process.env['VSCODE_DISTRO_REF']), + private: Boolean(process.env['VSCODE_DISTRO_REF']?.trim()), sourceBranch, queuedBy, assets: [], diff --git a/build/azure-pipelines/common/createBuild.ts b/build/azure-pipelines/common/createBuild.ts index d8b0fbff05f..8b1db94c412 100644 --- a/build/azure-pipelines/common/createBuild.ts +++ b/build/azure-pipelines/common/createBuild.ts @@ -27,9 +27,9 @@ function getEnv(name: string): string { async function main(): Promise { const [, , _version] = process.argv; const quality = getEnv('VSCODE_QUALITY'); - const commit = process.env['VSCODE_DISTRO_COMMIT'] || getEnv('BUILD_SOURCEVERSION'); + const commit = process.env['VSCODE_DISTRO_COMMIT']?.trim() || getEnv('BUILD_SOURCEVERSION'); const queuedBy = getEnv('BUILD_QUEUEDBY'); - const sourceBranch = process.env['VSCODE_DISTRO_REF'] || getEnv('BUILD_SOURCEBRANCH'); + const sourceBranch = process.env['VSCODE_DISTRO_REF']?.trim() || getEnv('BUILD_SOURCEBRANCH'); const version = _version + (quality === 'stable' ? '' : `-${quality}`); console.log('Creating build...'); @@ -42,7 +42,7 @@ async function main(): Promise { timestamp: (new Date()).getTime(), version, isReleased: false, - private: Boolean(process.env['VSCODE_DISTRO_REF']), + private: Boolean(process.env['VSCODE_DISTRO_REF']?.trim()), sourceBranch, queuedBy, assets: [],