fix regular builds

pull/145569/head
João Moreno 2022-03-21 16:06:48 +01:00
parent e5872fd73f
commit 9342d76f61
No known key found for this signature in database
GPG Key ID: 896B853774D1A575
2 changed files with 6 additions and 6 deletions

View File

@ -21,9 +21,9 @@ function getEnv(name) {
async function main() { async function main() {
const [, , _version] = process.argv; const [, , _version] = process.argv;
const quality = getEnv('VSCODE_QUALITY'); 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 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}`); const version = _version + (quality === 'stable' ? '' : `-${quality}`);
console.log('Creating build...'); console.log('Creating build...');
console.log('Quality:', quality); console.log('Quality:', quality);
@ -34,7 +34,7 @@ async function main() {
timestamp: (new Date()).getTime(), timestamp: (new Date()).getTime(),
version, version,
isReleased: false, isReleased: false,
private: Boolean(process.env['VSCODE_DISTRO_REF']), private: Boolean(process.env['VSCODE_DISTRO_REF']?.trim()),
sourceBranch, sourceBranch,
queuedBy, queuedBy,
assets: [], assets: [],

View File

@ -27,9 +27,9 @@ function getEnv(name: string): string {
async function main(): Promise<void> { async function main(): Promise<void> {
const [, , _version] = process.argv; const [, , _version] = process.argv;
const quality = getEnv('VSCODE_QUALITY'); 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 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}`); const version = _version + (quality === 'stable' ? '' : `-${quality}`);
console.log('Creating build...'); console.log('Creating build...');
@ -42,7 +42,7 @@ async function main(): Promise<void> {
timestamp: (new Date()).getTime(), timestamp: (new Date()).getTime(),
version, version,
isReleased: false, isReleased: false,
private: Boolean(process.env['VSCODE_DISTRO_REF']), private: Boolean(process.env['VSCODE_DISTRO_REF']?.trim()),
sourceBranch, sourceBranch,
queuedBy, queuedBy,
assets: [], assets: [],