fix(1.63): update patch (#937)

This commit is contained in:
Baptiste Augrain 2021-12-09 02:30:35 +01:00 committed by GitHub
parent f3ba593ae7
commit d164e43b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 35 deletions

View file

@ -8,26 +8,26 @@ git remote add origin https://github.com/Microsoft/vscode.git
# figure out latest tag by calling MS update API # figure out latest tag by calling MS update API
if [ "$INSIDER" == "1" ]; then if [ "$INSIDER" == "1" ]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
elif [[ -z "${MS_TAG}" ]]; then elif [[ -z "${MS_TAG}" ]]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
else else
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 ) reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
if [[ -z "${reference}" ]]; then if [[ -z "${reference}" ]]; then
echo "The following tag can't be found: ${MS_TAG}" echo "The following tag can't be found: ${MS_TAG}"
exit 1 exit 1
elif [[ "${reference}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then elif [[ "${reference}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
export MS_COMMIT="${BASH_REMATCH[1]}" export MS_COMMIT="${BASH_REMATCH[1]}"
export MS_TAG="${BASH_REMATCH[2]}" export MS_TAG="${BASH_REMATCH[2]}"
else else
echo "The following reference can't be parsed: ${reference}" echo "The following reference can't be parsed: ${reference}"
exit 1 exit 1
fi fi
fi fi
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}" echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
@ -39,6 +39,6 @@ cd ..
# for GH actions # for GH actions
if [[ $GITHUB_ENV ]]; then if [[ $GITHUB_ENV ]]; then
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV
fi fi

View file

@ -1,8 +1,8 @@
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 6d3a369..57009d4 100644 index df089a6..7aeb54b 100644
--- a/build/gulpfile.vscode.js --- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js
@@ -276,7 +276,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op @@ -286,7 +286,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' })); all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
} else if (platform === 'darwin') { } else if (platform === 'darwin') {
const shortcut = gulp.src('resources/darwin/bin/code.sh') const shortcut = gulp.src('resources/darwin/bin/code.sh')
@ -11,20 +11,11 @@ index 6d3a369..57009d4 100644
all = es.merge(all, shortcut); all = es.merge(all, shortcut);
} }
@@ -483,7 +483,7 @@ const generateVSCodeConfigurationTask = task.define('generate-vscode-configurati
const arch = process.env['VSCODE_ARCH'];
const appRoot = path.join(buildDir, `VSCode-darwin-${arch}`);
const appName = process.env.VSCODE_QUALITY === 'insider' ? 'Visual\\ Studio\\ Code\\ -\\ Insiders.app' : 'Visual\\ Studio\\ Code.app';
- const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', 'code');
+ const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', product.applicationName);
const codeProc = cp.exec(
`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`,
(err, stdout, stderr) => {
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
index 692db1d..cd173bc 100644 index bd4dc01..02cbbc2 100644
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
@@ -341,7 +341,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain @@ -355,7 +355,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
} }
private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> { private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> {
@ -33,7 +24,7 @@ index 692db1d..cd173bc 100644
const source = `/usr/local/bin/${this.productService.applicationName}`; const source = `/usr/local/bin/${this.productService.applicationName}`;
// Ensure source exists // Ensure source exists
@@ -551,7 +551,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain @@ -565,7 +565,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
// macOS // macOS
if (this.environmentMainService.isBuilt) { if (this.environmentMainService.isBuilt) {
@ -42,4 +33,3 @@ index 692db1d..cd173bc 100644
} }
return join(this.environmentMainService.appRoot, 'scripts', 'code-cli.sh'); return join(this.environmentMainService.appRoot, 'scripts', 'code-cli.sh');