chore: fix publishing

pull/235232/head
deepak1556 2024-12-04 18:37:37 +09:00
parent a9ee8b7fe9
commit 785c2b4845
No known key found for this signature in database
GPG Key ID: FCF39462ECA97661
3 changed files with 8 additions and 15 deletions

View File

@ -369,7 +369,7 @@ async function unzip(packagePath, outputPath) {
});
}
// Contains all of the logic for mapping details to our actual product names in CosmosDB
function getPlatform(product, os, arch, type, isLegacy) {
function getPlatform(product, os, arch, type) {
switch (os) {
case 'win32':
switch (product) {
@ -414,12 +414,12 @@ function getPlatform(product, os, arch, type, isLegacy) {
case 'client':
return `linux-${arch}`;
case 'server':
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
return `server-linux-${arch}`;
case 'web':
if (arch === 'standalone') {
return 'web-standalone';
}
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
return `server-linux-${arch}-web`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@ -480,8 +480,7 @@ async function processArtifact(artifact, filePath) {
const quality = e('VSCODE_QUALITY');
const version = e('BUILD_SOURCEVERSION');
const { product, os, arch, unprocessedType } = match.groups;
const isLegacy = artifact.name.includes('_legacy');
const platform = getPlatform(product, os, arch, unprocessedType, isLegacy);
const platform = getPlatform(product, os, arch, unprocessedType);
const type = getRealType(unprocessedType);
const size = fs.statSync(filePath).size;
const stream = fs.createReadStream(filePath);
@ -539,9 +538,6 @@ async function main() {
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') {
stages.add('Linux');
}
if (e('VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER') === 'True') {
stages.add('LinuxLegacyServer');
}
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') {
stages.add('Alpine');
}

View File

@ -685,7 +685,7 @@ interface Asset {
}
// Contains all of the logic for mapping details to our actual product names in CosmosDB
function getPlatform(product: string, os: string, arch: string, type: string, isLegacy: boolean): string {
function getPlatform(product: string, os: string, arch: string, type: string): string {
switch (os) {
case 'win32':
switch (product) {
@ -730,12 +730,12 @@ function getPlatform(product: string, os: string, arch: string, type: string, is
case 'client':
return `linux-${arch}`;
case 'server':
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
return `server-linux-${arch}`;
case 'web':
if (arch === 'standalone') {
return 'web-standalone';
}
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
return `server-linux-${arch}-web`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@ -803,8 +803,7 @@ async function processArtifact(
const quality = e('VSCODE_QUALITY');
const version = e('BUILD_SOURCEVERSION');
const { product, os, arch, unprocessedType } = match.groups!;
const isLegacy = artifact.name.includes('_legacy');
const platform = getPlatform(product, os, arch, unprocessedType, isLegacy);
const platform = getPlatform(product, os, arch, unprocessedType);
const type = getRealType(unprocessedType);
const size = fs.statSync(filePath).size;
const stream = fs.createReadStream(filePath);
@ -874,7 +873,6 @@ async function main() {
const stages = new Set<string>(['Compile', 'CompileCLI']);
if (e('VSCODE_BUILD_STAGE_WINDOWS') === 'True') { stages.add('Windows'); }
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') { stages.add('Linux'); }
if (e('VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER') === 'True') { stages.add('LinuxLegacyServer'); }
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') { stages.add('Alpine'); }
if (e('VSCODE_BUILD_STAGE_MACOS') === 'True') { stages.add('macOS'); }
if (e('VSCODE_BUILD_STAGE_WEB') === 'True') { stages.add('Web'); }

View File

@ -100,7 +100,6 @@ steps:
$stages = @(
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER -eq 'True') { 'LinuxLegacyServer' }
if ($env:VSCODE_BUILD_STAGE_ALPINE -eq 'True') { 'Alpine' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }