diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index d5bca549..9e977e71 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -80,7 +80,7 @@ function prepareDebPackage(arch) { const that = this; gulp.src('resources/linux/debian/control.template', { base: '.' }) .pipe(replace('@@NAME@@', product.applicationName)) - .pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision)) + .pipe(replace('@@VERSION@@', packageJson.IDEVersion + '-' + linuxPackageRevision)) .pipe(replace('@@ARCHITECTURE@@', debArch)) .pipe(replace('@@INSTALLEDSIZE@@', Math.ceil(size / 1024))) .pipe(rename('DEBIAN/control')) @@ -183,7 +183,7 @@ function prepareRpmPackage(arch) { .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@NAME_LONG@@', IdeName)) .pipe(replace('@@ICON@@', product.linuxIconName)) - .pipe(replace('@@VERSION@@', packageJson.version)) + .pipe(replace('@@VERSION@@', packageJson.IDEVersion)) .pipe(replace('@@RELEASE@@', linuxPackageRevision)) .pipe(replace('@@ARCHITECTURE@@', rpmArch)) .pipe(replace('@@LICENSE@@', product.licenseName)) diff --git a/package.json b/package.json index 0c0da689..2831f6c6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "code-oss-dev", + "IDEVersion": "10.0.1", "version": "1.68.0", "distro": "2966cd72fc1a3a5fb89bf2d85a1a66e56206961a", "author": { diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts index f8223731..ccf0401d 100644 --- a/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts @@ -31,6 +31,7 @@ export type ExtensionVirtualWorkspaceSupport = { }; export interface IProductConfiguration { + readonly IDEVersion: string; readonly version: string; readonly date?: string; readonly quality?: string; diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts index 49f1f4cf..ea0bb1ed 100644 --- a/src/vs/code/node/cli.ts +++ b/src/vs/code/node/cli.ts @@ -51,12 +51,12 @@ export async function main(argv: string[]): Promise { // Help if (args.help) { const executable = `${product.applicationName}${isWindows ? '.exe' : ''}`; - console.log(buildHelpMessage(product.nameLong, executable, product.version, OPTIONS)); + console.log(buildHelpMessage(product.nameLong, executable, product.IDEVersion, OPTIONS)); } // Version Info else if (args.version) { - console.log(buildVersionMessage(product.version, product.commit)); + console.log(buildVersionMessage(product.IDEVersion, product.commit)); } // Extensions Management diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index 7e63a164..80a651e7 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -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 { IDEVersion: string; version: string }; // Running out of sources if (env['VSCODE_DEV']) { @@ -45,6 +45,7 @@ else if (typeof require?.__$__nodeRequire === 'function') { } Object.assign(product, { + IDEVersion: pkg.IDEVersion, version: pkg.version }); } diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts index ec4ff95e..041841f7 100644 --- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts +++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts @@ -145,7 +145,7 @@ export class BrowserDialogHandler implements IDialogHandler { const detailString = (useAgo: boolean): string => { return localize('aboutDetail', "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}", - this.productService.version || 'Unknown', + this.productService.IDEVersion || 'Unknown', this.productService.commit || 'Unknown', this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown', navigator.userAgent diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts index a4728e73..3dfc6e77 100644 --- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts +++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts @@ -156,7 +156,7 @@ export class NativeDialogHandler implements IDialogHandler { } async about(): Promise { - let version = this.productService.version; + let version = this.productService.IDEVersion; if (this.productService.target) { version = `${version} (${this.productService.target} setup)`; } else if (this.productService.darwinUniversalAssetId) {