123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
- index e0df76f..04354d8 100644
- --- a/build/gulpfile.reh.js
- +++ b/build/gulpfile.reh.js
- @@ -310,2 +310,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
- const name = product.nameShort;
- + const release = packageJson.release;
-
- @@ -313,3 +314,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
- const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
- - .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
- + .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
- .pipe(es.through(function (file) {
- @@ -321,3 +322,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
- const productJsonStream = gulp.src(['product.json'], { base: '.' })
- - .pipe(json({ commit, date: readISODate('out-build'), version }))
- + .pipe(json({ commit, date: readISODate('out-build'), version, release }))
- .pipe(es.through(function (file) {
- diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
- index a63f693..62e0080 100644
- --- a/build/gulpfile.vscode.js
- +++ b/build/gulpfile.vscode.js
- @@ -261,3 +261,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
-
- - let version = packageJson.version;
- + let version = packageJson.version
- const quality = product.quality;
- @@ -269,3 +269,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 };
-
- @@ -285,3 +286,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
- const productJsonStream = gulp.src(['product.json'], { base: '.' })
- - .pipe(json({ commit, date: readISODate('out-build'), checksums, version }))
- + .pipe(json({ commit, date: readISODate('out-build'), checksums, version, release }))
- .pipe(es.through(function (file) {
- diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
- index fb0e5a4..170c60b 100644
- --- a/build/gulpfile.vscode.linux.js
- +++ b/build/gulpfile.vscode.linux.js
- @@ -27,4 +27,2 @@ const commit = getVersion(root);
-
- -const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
- -
- /**
- @@ -89,3 +87,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))
- @@ -204,4 +202,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))
- @@ -281,3 +278,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 98175f5..afacbe3 100644
- --- a/build/gulpfile.vscode.win32.js
- +++ b/build/gulpfile.vscode.win32.js
- @@ -89,4 +89,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/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
- index 52c4c94..00fc9f8 100644
- --- a/src/vs/base/common/product.ts
- +++ b/src/vs/base/common/product.ts
- @@ -58,2 +58,3 @@ export interface IProductConfiguration {
- readonly version: string;
- + readonly release: string;
- readonly date?: string;
- diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
- index 5f6efd5..da3c54d 100644
- --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
- +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
- @@ -232,3 +232,3 @@ export class DiagnosticsService implements IDiagnosticsService {
- 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()}`);
- diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
- index 1a2a619..2a8d683 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) {
- if (!product.version) {
- - const pkg = globalThis._VSCODE_PACKAGE_JSON as { version: string };
- + const pkg = globalThis._VSCODE_PACKAGE_JSON as { version: string, release: string };
-
- Object.assign(product, {
- - version: pkg.version
- + version: pkg.version,
- + release: pkg.release
- });
- diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
- index 7563b30..0873839 100644
- --- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
- +++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
- @@ -23,2 +23,3 @@ import { ResultKind } from '../../../../platform/keybinding/common/keybindingRes
- import { IOpenerService } from '../../../../platform/opener/common/opener.js';
- +import { getReleaseString } from '../../../../workbench/common/release.js';
-
- @@ -81,2 +82,4 @@ export class BrowserDialogHandler extends AbstractDialogHandler {
- const detailString = (useAgo: boolean): string => {
- + const releaseString = getReleaseString();
- +
- return localize('aboutDetail',
- @@ -87,3 +90,3 @@ export class BrowserDialogHandler extends AbstractDialogHandler {
- navigator.userAgent
- - );
- + ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
- };
- diff --git a/src/vs/workbench/common/release.ts b/src/vs/workbench/common/release.ts
- new file mode 100644
- index 0000000..82dbe6a
- --- /dev/null
- +++ b/src/vs/workbench/common/release.ts
- @@ -0,0 +1,14 @@
- +import { language } from '../../base/common/platform.js';
- +
- +const DEFAULT_LABEL = 'Release:';
- +const LABELS: { [key: string]: string } = {
- + 'en': DEFAULT_LABEL,
- + 'fr': 'Révision :',
- + 'ru': 'Релиз:',
- + 'zh-hans': '发布版本:',
- + 'zh-hant': '發布版本:',
- +};
- +
- +export function getReleaseString(): string {
- + 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 6c61a59..d58f8fc 100644
- --- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
- +++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
- @@ -15,2 +15,3 @@ import { process } from '../../../../base/parts/sandbox/electron-sandbox/globals
- import { getActiveWindow } from '../../../../base/browser/dom.js';
- +import { getReleaseString } from '../../../../workbench/common/release.js';
-
- @@ -80,2 +81,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
- const osProps = await this.nativeHostService.getOSProperties();
- + const releaseString = getReleaseString();
-
- @@ -93,3 +95,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
- `${osProps.type} ${osProps.arch} ${osProps.release}${isLinuxSnap ? ' snap' : ''}`
- - );
- + ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
- };
|