Skip to content

Commit 5e0394c

Browse files
authored
fix: don't package detection script in legacy server (microsoft#208274)
* fix: don't package detection script in legacy server * chore: address review feedback * chore: rename download asset name
1 parent d187a75 commit 5e0394c

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

build/azure-pipelines/common/publish.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/azure-pipelines/common/publish.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,12 @@ function getPlatform(product: string, os: string, arch: string, type: string, is
582582
case 'client':
583583
return `linux-${arch}`;
584584
case 'server':
585-
return isLegacy ? `legacy-server-linux-${arch}` : `server-linux-${arch}`;
585+
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
586586
case 'web':
587587
if (arch === 'standalone') {
588588
return 'web-standalone';
589589
}
590-
return isLegacy ? `legacy-server-linux-${arch}-web` : `server-linux-${arch}-web`;
590+
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
591591
default:
592592
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
593593
}

build/azure-pipelines/linux/product-build-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ steps:
223223
224224
- script: |
225225
set -e
226-
export VSCODE_NODE_GLIBC='-glibc-2.17'
227226
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
228227
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
229228
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
@@ -236,7 +235,6 @@ steps:
236235
237236
- script: |
238237
set -e
239-
export VSCODE_NODE_GLIBC='-glibc-2.17'
240238
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
241239
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
242240
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"

build/gulpfile.reh.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,13 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
373373
);
374374
}
375375

376-
if (platform === 'linux' || platform === 'alpine') {
376+
if (platform === 'linux' && process.env['VSCODE_NODE_GLIBC'] === '-glibc-2.17') {
377+
result = es.merge(result,
378+
gulp.src(`resources/server/bin/helpers/check-requirements-linux-legacy.sh`, { base: '.' })
379+
.pipe(rename(`bin/helpers/check-requirements.sh`))
380+
.pipe(util.setExecutableBit())
381+
);
382+
} else if (platform === 'linux' || platform === 'alpine') {
377383
result = es.merge(result,
378384
gulp.src(`resources/server/bin/helpers/check-requirements-linux.sh`, { base: '.' })
379385
.pipe(replace('@@SERVER_APPLICATION_NAME@@', product.serverApplicationName))

resources/server/bin/code-server-linux.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,4 @@ esac
99

1010
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
1111

12-
# Do not remove this check.
13-
# Provides a way to skip the server requirements check from
14-
# outside the install flow. A system process can create this
15-
# file before the server is downloaded and installed.
16-
skip_check=0
17-
if [ -f "/tmp/vscode-skip-server-requirements-check" ]; then
18-
echo "!!! WARNING: Skipping server pre-requisite check !!!"
19-
echo "!!! Server stability is not guaranteed. Proceed at your own risk. !!!"
20-
skip_check=1
21-
fi
22-
23-
# Check platform requirements
24-
if [ "$(echo "$@" | grep -c -- "--skip-requirements-check")" -eq 0 ] && [ $skip_check -eq 0 ]; then
25-
$ROOT/bin/helpers/check-requirements.sh
26-
exit_code=$?
27-
if [ $exit_code -ne 0 ]; then
28-
exit $exit_code
29-
fi
30-
fi
31-
3212
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env sh
2+
#
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
#
5+
6+
set -e
7+
8+
echo "!!! WARNING: Using legacy server, please check https://aka.ms/vscode-remote/faq/old-linux for additional information !!!"
9+
exit 0

0 commit comments

Comments
 (0)