vscodium/patches/build-version.patch

213 lines
12 KiB
Diff
Raw Normal View History

diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
2022-08-16 17:00:11 +00:00
index 2abc3f3..a3cbf2d 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
2022-08-16 17:00:11 +00:00
@@ -246,8 +246,9 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
}
2022-08-16 17:00:11 +00:00
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 }));
const date = new Date().toISOString();
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
2022-08-16 17:00:11 +00:00
index 28f8e52..f17962d 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -187,7 +187,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const sources = es.merge(src, extensions)
.pipe(filter(['**', '!**/*.js.map'], { dot: true }));
- let version = packageJson.version;
2022-08-16 17:00:11 +00:00
+ let version = packageJson.version
const quality = product.quality;
if (quality && quality !== 'stable') {
2022-08-16 17:00:11 +00:00
@@ -195,7 +195,8 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
}
const name = product.nameShort;
- const packageJsonUpdates = { name, version };
+ const release = packageJson.release;
+ const packageJsonUpdates = { name, version, release };
// for linux url handling
if (platform === 'linux') {
2022-08-16 11:51:45 +00:00
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
2022-08-16 17:00:11 +00:00
index 489d9cc..e9f00f3 100644
2022-08-16 11:51:45 +00:00
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -83,7 +83,7 @@ function prepareDebPackage(arch) {
const dependencies = debianDependenciesGenerator.getDependencies(binaryDir, product.applicationName, debArch, sysroot);
gulp.src('resources/linux/debian/control.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
2022-08-16 17:00:11 +00:00
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
2022-08-16 11:51:45 +00:00
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(replace('@@DEPENDS@@', dependencies.join(', ')))
.pipe(replace('@@RECOMMENDS@@', debianRecommendedDependencies.join(', ')))
@@ -188,8 +188,7 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@ICON@@', product.linuxIconName))
- .pipe(replace('@@VERSION@@', packageJson.version))
- .pipe(replace('@@RELEASE@@', linuxPackageRevision))
2022-08-16 17:00:11 +00:00
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
2022-08-16 11:51:45 +00:00
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
@@ -262,7 +261,7 @@ function prepareSnapPackage(arch) {
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
2022-08-16 17:00:11 +00:00
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
2022-08-16 11:51:45 +00:00
// Possible run-on values https://snapcraft.io/docs/architectures
.pipe(replace('@@ARCHITECTURE@@', arch === 'x64' ? 'amd64' : arch))
.pipe(rename('snap/snapcraft.yaml'));
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
2022-08-16 17:00:11 +00:00
index 81ba509..43f5377 100644
2022-08-16 11:51:45 +00:00
--- a/build/gulpfile.vscode.win32.js
+++ b/build/gulpfile.vscode.win32.js
@@ -91,8 +91,8 @@ function buildWin32Setup(arch, target) {
NameLong: product.nameLong,
NameShort: product.nameShort,
DirName: product.win32DirName,
- Version: pkg.version,
- RawVersion: pkg.version.replace(/-\w+$/, ''),
2022-08-16 17:00:11 +00:00
+ Version: `${pkg.version}.${pkg.release}`,
+ RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
2022-08-16 11:51:45 +00:00
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
ExeBasename: product.nameShort,
RegValueName: product.win32RegValueName,
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index 00ddb6f..814c964 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -1,6 +1,6 @@
Name: @@NAME@@
Version: @@VERSION@@
-Release: @@RELEASE@@.el7
+Release: el7
Summary: Code editing. Redefined.
Group: Development/Tools
Vendor: Microsoft Corporation
2022-08-16 17:00:11 +00:00
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1ae8079..0dad6ac 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -32,6 +32,7 @@ export type ExtensionVirtualWorkspaceSupport = {
2022-08-16 11:51:45 +00:00
2022-08-16 17:00:11 +00:00
export interface IProductConfiguration {
readonly version: string;
+ readonly release: string;
readonly date?: string;
readonly quality?: string;
readonly commit?: string;
2022-08-16 21:37:20 +00:00
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
index 046cb39..3271b6c 100644
--- a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
+++ b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
@@ -75,7 +75,7 @@ export class IssueReporter extends Disposable {
this.issueReporterModel = new IssueReporterModel({
issueType: configuration.data.issueType || IssueType.Bug,
versionInfo: {
- vscodeVersion: `${configuration.product.nameShort} ${!!configuration.product.darwinUniversalAssetId ? `${configuration.product.version} (Universal)` : configuration.product.version} (${configuration.product.commit || 'Commit unknown'}, ${configuration.product.date || 'Date unknown'})`,
+ vscodeVersion: `${configuration.product.nameShort} ${!!configuration.product.darwinUniversalAssetId ? `${configuration.product.version} (Universal)` : configuration.product.version} ${configuration.product.release || 'Release unknown'} (${configuration.product.commit || 'Commit unknown'}, ${configuration.product.date || 'Date unknown'})`,
os: `${this.configuration.os.type} ${this.configuration.os.arch} ${this.configuration.os.release}${isLinuxSnap ? ' snap' : ''}`
},
extensionsDisabled: !!configuration.disableExtensions,
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
index b0cc736..035c5cb 100644
--- a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
+++ b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
@@ -74,7 +74,7 @@ Type: <b>${this.getIssueTypeTitle()}</b>
${this._data.issueDescription}
${this.getExtensionVersion()}
-VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
+VSCodium version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
Modes:${modes.length ? ' ' + modes.join(', ') : ''}
${this.getRemoteOSes()}
2022-08-16 17:00:11 +00:00
diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
index e1c60a3..a12d52c 100644
--- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
+++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
@@ -237,7 +237,7 @@ export class DiagnosticsService implements IDiagnosticsService {
2022-08-16 11:51:45 +00:00
2022-08-16 17:00:11 +00:00
private formatEnvironment(info: IMainProcessInfo): string {
const output: string[] = [];
- output.push(`Version: ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
+ 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()}`);
const cpus = osLib.cpus();
if (cpus && cpus.length > 0) {
2022-08-16 11:51:45 +00:00
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
2022-08-16 17:00:11 +00:00
index 7e63a16..74d1f26 100644
2022-08-16 11:51:45 +00:00
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
2022-08-16 17:00:11 +00:00
@@ -32,7 +32,7 @@ else if (typeof require?.__$__nodeRequire === 'function') {
const rootPath = dirname(FileAccess.asFileUri('', require));
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
- const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
+ const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string, release: string };
// Running out of sources
if (env['VSCODE_DEV']) {
@@ -45,7 +45,8 @@ else if (typeof require?.__$__nodeRequire === 'function') {
2022-08-16 11:51:45 +00:00
}
Object.assign(product, {
- version: pkg.version
2022-08-16 17:00:11 +00:00
+ version: pkg.version,
+ release: pkg.release
2022-08-16 11:51:45 +00:00
});
}
2022-08-16 17:00:11 +00:00
diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
index ec4ff95..f721052 100644
--- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
@@ -144,7 +144,8 @@ export class BrowserDialogHandler implements IDialogHandler {
async about(): Promise<void> {
const detailString = (useAgo: boolean): string => {
return localize('aboutDetail',
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nBrowser: {4}",
+ this.productService.release || 'Unknown',
this.productService.version || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
diff --git a/src/vs/workbench/contrib/issue/browser/issueService.ts b/src/vs/workbench/contrib/issue/browser/issueService.ts
index dc7430b..23def01 100644
--- a/src/vs/workbench/contrib/issue/browser/issueService.ts
+++ b/src/vs/workbench/contrib/issue/browser/issueService.ts
@@ -65,6 +65,7 @@ export class WebIssueService implements IWorkbenchIssueService {
return `ADD ISSUE DESCRIPTION HERE
Version: ${this.productService.version}
+Release: ${this.productService.release ?? 'unknown'}
Commit: ${this.productService.commit ?? 'unknown'}
User Agent: ${userAgent ?? 'unknown'}
Embedder: ${this.productService.embedderIdentifier ?? 'unknown'}
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
index a4728e7..d1a8b94 100644
--- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
@@ -167,8 +167,9 @@ export class NativeDialogHandler implements IDialogHandler {
const detailString = (useAgo: boolean): string => {
return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
- "Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChromium: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}",
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nElectron: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}",
version,
+ this.productService.release || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
process.versions['electron'],