Skip to content

Commit

Permalink
feat(1.86): update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Feb 3, 2024
1 parent a49d4f1 commit 2faafce
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 261 deletions.
184 changes: 92 additions & 92 deletions patches/brand.patch

Large diffs are not rendered by default.

52 changes: 25 additions & 27 deletions patches/build-version.patch
Original file line number Diff line number Diff line change
@@ -1,86 +1,84 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 2a0c236..9fea722 100644
index df18cf0..6f59211 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -250,4 +250,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
@@ -289,4 +289,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const name = product.nameShort;
+ const release = packageJson.release;
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
- .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
+ .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));

@@ -256,3 +257,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
@@ -295,3 +296,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const productJsonStream = gulp.src(['product.json'], { base: '.' })
- .pipe(json({ commit, date, version }));
+ .pipe(json({ commit, date, version, release }));

diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 0ca2cfd..3fb21d5 100644
index bfd5c89..bc84f18 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -225,3 +225,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -233,3 +233,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op

- let version = packageJson.version;
+ let version = packageJson.version
const quality = product.quality;
@@ -233,3 +233,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -241,3 +241,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const name = product.nameShort;
- const packageJsonUpdates = { name, version };
+ const release = packageJson.release;
+ const packageJsonUpdates = { name, version, release };

@@ -244,3 +245,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -252,3 +253,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const date = new Date().toISOString();
- const productJsonUpdate = { commit, date, checksums, version };
+ const productJsonUpdate = { commit, date, checksums, version, release };

diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 90f75cc..275c958 100644
index 8c2b62f..098f8d9 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -25,4 +25,2 @@ const commit = getVersion(root);
@@ -24,4 +24,2 @@ const commit = getVersion(root);

-const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
-
/**
@@ -88,3 +86,3 @@ function prepareDebPackage(arch) {
@@ -86,3 +84,3 @@ function prepareDebPackage(arch) {
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', debArch))
@@ -193,4 +191,3 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@ICON@@', product.linuxIconName))
- .pipe(replace('@@VERSION@@', packageJson.version))
- .pipe(replace('@@RELEASE@@', linuxPackageRevision))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
@@ -267,3 +264,3 @@ function prepareSnapPackage(arch) {
@@ -196,2 +194,3 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@RELEASE@@', linuxPackageRevision))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
@@ -270,3 +269,3 @@ function prepareSnapPackage(arch) {
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
// Possible run-on values https://snapcraft.io/docs/architectures
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
index 6e9a6f3..9d80b6b 100644
index 5adfdfb..d6ddead 100644
--- a/build/gulpfile.vscode.win32.js
+++ b/build/gulpfile.vscode.win32.js
@@ -94,4 +94,4 @@ function buildWin32Setup(arch, target) {
@@ -90,4 +90,4 @@ function buildWin32Setup(arch, target) {
DirName: product.win32DirName,
- Version: pkg.version,
- RawVersion: pkg.version.replace(/-\w+$/, ''),
+ Version: `${pkg.version}.${pkg.release}`,
+ RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index 06b8549..3af1f45 100644
index c9e57db..aef439c 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -2,3 +2,3 @@ Name: @@NAME@@
Version: @@VERSION@@
-Release: @@RELEASE@@.el7
+Release: el7
-Release: @@RELEASE@@.el8
+Release: el8
Summary: Code editing. Redefined.
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index ac9cd5d..87b6105 100644
index cbd573f..c7bbc90 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -58,2 +58,3 @@ export interface IProductConfiguration {
Expand All @@ -97,7 +95,7 @@ index 0be311f..d6c4a18 100644
+ output.push(`Version: ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
output.push(`OS Version: ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index 51a55e1..26dfe7b 100644
index 9482a2c..c3ef5bd 100644
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
@@ -43,6 +43,7 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
Expand All @@ -111,7 +109,7 @@ index 51a55e1..26dfe7b 100644
+ release: pkg.release
});
diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
index 4b320bb..6619c75 100644
index c064ebc..72a9fa9 100644
--- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
@@ -22,2 +22,3 @@ import { defaultButtonStyles, defaultCheckboxStyles, defaultDialogStyles, defaul
Expand Down Expand Up @@ -149,7 +147,7 @@ index 0000000..2a8ea57
+ return LABELS[language] ?? DEFAULT_LABEL;
+}
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
index 575bde3..f427833 100644
index 3940ab6..609e5ed 100644
--- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
@@ -14,2 +14,3 @@ import { IProductService } from 'vs/platform/product/common/productService';
Expand All @@ -160,7 +158,7 @@ index 575bde3..f427833 100644
const osProps = await this.nativeHostService.getOSProperties();
+ const releaseString = getReleaseString();

@@ -89,3 +91,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
@@ -90,3 +92,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
`${osProps.type} ${osProps.arch} ${osProps.release}${isLinuxSnap ? ' snap' : ''}`
- );
+ ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
Expand Down
20 changes: 10 additions & 10 deletions patches/fix-build-linux.patch
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 0d7d3c5..90f75cc 100644
index 8c2b62f..4e1d6ff 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -299,4 +299,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
@@ -302,4 +302,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(util.rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
- gulp.task(prepareDebTask);
- const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, buildDebPackage(arch));
+ const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
gulp.task(buildDebTask);
@@ -305,4 +304,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
@@ -308,4 +307,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(util.rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
- gulp.task(prepareRpmTask);
- const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, buildRpmPackage(arch));
+ const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
gulp.task(buildRpmTask);
diff --git a/build/linux/dependencies-generator.js b/build/linux/dependencies-generator.js
index 381539d..0f26614 100644
index e40ed70..7bbd195 100644
--- a/build/linux/dependencies-generator.js
+++ b/build/linux/dependencies-generator.js
@@ -22,3 +22,3 @@ const types_2 = require("./rpm/types");
@@ -24,3 +24,3 @@ const product = require("../../product.json");
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/114.0.5735.199:chrome/installer/linux/BUILD.gn;l=64-80
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/118.0.5993.159:chrome/installer/linux/BUILD.gn;l=64-80
diff --git a/build/linux/dependencies-generator.ts b/build/linux/dependencies-generator.ts
index 5c4b9d2..a2c629a 100644
index 12bc3c0..3c69e43 100644
--- a/build/linux/dependencies-generator.ts
+++ b/build/linux/dependencies-generator.ts
@@ -23,3 +23,3 @@ import { isRpmArchString, RpmArchString } from './rpm/types';
@@ -25,3 +25,3 @@ import product = require('../../product.json');
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;

diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index 06b8549..a7e3dfb 100644
index c9e57db..bda2604 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -81 +81,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
@@ -87 +87,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/zsh/site-functions/_%{name}
+
+%config(noreplace) /usr/share/%{name}/resources/app/product.json
Expand Down
Loading

0 comments on commit 2faafce

Please sign in to comment.