mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
fix legacy builds (#208314)
* fix legacy builds * update regex * extra ? * argh
This commit is contained in:
parent
9202044397
commit
b40321263d
|
@ -481,7 +481,7 @@ function getRealType(type) {
|
||||||
}
|
}
|
||||||
async function processArtifact(artifact, artifactFilePath) {
|
async function processArtifact(artifact, artifactFilePath) {
|
||||||
const log = (...args) => console.log(`[${artifact.name}]`, ...args);
|
const log = (...args) => console.log(`[${artifact.name}]`, ...args);
|
||||||
const match = /^vscode(?:_legacy)?_(?<product>[^_]+)_(?<os>[^_]+)_(?<arch>[^_]+)_(?<unprocessedType>[^_]+)$/.exec(artifact.name);
|
const match = /^vscode_(?<product>[^_]+)_(?<os>[^_]+)(?:_legacy)?_(?<arch>[^_]+)_(?<unprocessedType>[^_]+)$/.exec(artifact.name);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
throw new Error(`Invalid artifact name: ${artifact.name}`);
|
throw new Error(`Invalid artifact name: ${artifact.name}`);
|
||||||
}
|
}
|
||||||
|
@ -531,6 +531,9 @@ async function main() {
|
||||||
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') {
|
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') {
|
||||||
stages.add('Linux');
|
stages.add('Linux');
|
||||||
}
|
}
|
||||||
|
if (e('VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER') === 'True') {
|
||||||
|
stages.add('LinuxLegacyServer');
|
||||||
|
}
|
||||||
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') {
|
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') {
|
||||||
stages.add('Alpine');
|
stages.add('Alpine');
|
||||||
}
|
}
|
||||||
|
|
|
@ -644,7 +644,7 @@ function getRealType(type: string) {
|
||||||
|
|
||||||
async function processArtifact(artifact: Artifact, artifactFilePath: string): Promise<void> {
|
async function processArtifact(artifact: Artifact, artifactFilePath: string): Promise<void> {
|
||||||
const log = (...args: any[]) => console.log(`[${artifact.name}]`, ...args);
|
const log = (...args: any[]) => console.log(`[${artifact.name}]`, ...args);
|
||||||
const match = /^vscode(?:_legacy)?_(?<product>[^_]+)_(?<os>[^_]+)_(?<arch>[^_]+)_(?<unprocessedType>[^_]+)$/.exec(artifact.name);
|
const match = /^vscode_(?<product>[^_]+)_(?<os>[^_]+)(?:_legacy)?_(?<arch>[^_]+)_(?<unprocessedType>[^_]+)$/.exec(artifact.name);
|
||||||
|
|
||||||
if (!match) {
|
if (!match) {
|
||||||
throw new Error(`Invalid artifact name: ${artifact.name}`);
|
throw new Error(`Invalid artifact name: ${artifact.name}`);
|
||||||
|
@ -712,6 +712,7 @@ async function main() {
|
||||||
const stages = new Set<string>(['Compile', 'CompileCLI']);
|
const stages = new Set<string>(['Compile', 'CompileCLI']);
|
||||||
if (e('VSCODE_BUILD_STAGE_WINDOWS') === 'True') { stages.add('Windows'); }
|
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') === '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_ALPINE') === 'True') { stages.add('Alpine'); }
|
||||||
if (e('VSCODE_BUILD_STAGE_MACOS') === 'True') { stages.add('macOS'); }
|
if (e('VSCODE_BUILD_STAGE_MACOS') === 'True') { stages.add('macOS'); }
|
||||||
if (e('VSCODE_BUILD_STAGE_WEB') === 'True') { stages.add('Web'); }
|
if (e('VSCODE_BUILD_STAGE_WEB') === 'True') { stages.add('Web'); }
|
||||||
|
|
|
@ -171,7 +171,7 @@ steps:
|
||||||
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
||||||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||||
ARCHIVE_PATH=".build/linux/server/legacy-vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-legacy-$(VSCODE_ARCH).tar.gz"
|
||||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||||
|
@ -184,7 +184,7 @@ steps:
|
||||||
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
export VSCODE_NODE_GLIBC="-glibc-2.17"
|
||||||
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||||
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||||
ARCHIVE_PATH=".build/linux/web/legacy-vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"
|
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-legacy-$(VSCODE_ARCH)-web.tar.gz"
|
||||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)-web
|
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)-web
|
||||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||||
|
@ -202,22 +202,22 @@ steps:
|
||||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||||
|
|
||||||
- task: 1ES.PublishPipelineArtifact@1
|
- task: 1ES.PublishPipelineArtifact@1
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: $(SERVER_PATH)
|
targetPath: $(SERVER_PATH)
|
||||||
artifactName: $(ARTIFACT_PREFIX)vscode_legacy_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
artifactName: $(ARTIFACT_PREFIX)vscode_server_linux_legacy_$(VSCODE_ARCH)_archive-unsigned
|
||||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Server"
|
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Server"
|
||||||
sbomPackageVersion: $(Build.SourceVersion)
|
sbomPackageVersion: $(Build.SourceVersion)
|
||||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
|
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
|
||||||
displayName: Publish server archive
|
displayName: Publish server archive
|
||||||
|
|
||||||
- task: 1ES.PublishPipelineArtifact@1
|
- task: 1ES.PublishPipelineArtifact@1
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: $(WEB_PATH)
|
targetPath: $(WEB_PATH)
|
||||||
artifactName: $(ARTIFACT_PREFIX)vscode_legacy_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_legacy_$(VSCODE_ARCH)_archive-unsigned
|
||||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Web"
|
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Web"
|
||||||
sbomPackageVersion: $(Build.SourceVersion)
|
sbomPackageVersion: $(Build.SourceVersion)
|
||||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||||
displayName: Publish web server archive
|
displayName: Publish web server archive
|
||||||
|
|
|
@ -116,6 +116,7 @@ steps:
|
||||||
$stages = @(
|
$stages = @(
|
||||||
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
|
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
|
||||||
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
|
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_ALPINE -eq 'True') { 'Alpine' }
|
||||||
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
|
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
|
||||||
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
|
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
|
||||||
|
|
Loading…
Reference in a new issue