build-version.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
  2. index a07c552..e5546e0 100644
  3. --- a/build/gulpfile.reh.js
  4. +++ b/build/gulpfile.reh.js
  5. @@ -250,4 +250,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
  6. const name = product.nameShort;
  7. + const release = packageJson.release;
  8. const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
  9. - .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
  10. + .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));
  11. diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
  12. index 2c075a3..ff98402 100644
  13. --- a/build/gulpfile.vscode.js
  14. +++ b/build/gulpfile.vscode.js
  15. @@ -191,3 +191,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
  16. - let version = packageJson.version;
  17. + let version = packageJson.version
  18. const quality = product.quality;
  19. @@ -199,3 +199,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
  20. const name = product.nameShort;
  21. - const packageJsonUpdates = { name, version };
  22. + const release = packageJson.release;
  23. + const packageJsonUpdates = { name, version, release };
  24. diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
  25. index 4a25ca5..ca33d2e 100644
  26. --- a/build/gulpfile.vscode.linux.js
  27. +++ b/build/gulpfile.vscode.linux.js
  28. @@ -24,4 +24,2 @@ const commit = util.getVersion(root);
  29. -const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
  30. -
  31. /**
  32. @@ -87,3 +85,3 @@ function prepareDebPackage(arch) {
  33. .pipe(replace('@@NAME@@', product.applicationName))
  34. - .pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
  35. + .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
  36. .pipe(replace('@@ARCHITECTURE@@', debArch))
  37. @@ -192,4 +190,3 @@ function prepareRpmPackage(arch) {
  38. .pipe(replace('@@ICON@@', product.linuxIconName))
  39. - .pipe(replace('@@VERSION@@', packageJson.version))
  40. - .pipe(replace('@@RELEASE@@', linuxPackageRevision))
  41. + .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
  42. .pipe(replace('@@ARCHITECTURE@@', rpmArch))
  43. @@ -266,3 +263,3 @@ function prepareSnapPackage(arch) {
  44. .pipe(replace('@@NAME@@', product.applicationName))
  45. - .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
  46. + .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
  47. // Possible run-on values https://snapcraft.io/docs/architectures
  48. diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
  49. index 81ba509..43f5377 100644
  50. --- a/build/gulpfile.vscode.win32.js
  51. +++ b/build/gulpfile.vscode.win32.js
  52. @@ -93,4 +93,4 @@ function buildWin32Setup(arch, target) {
  53. DirName: product.win32DirName,
  54. - Version: pkg.version,
  55. - RawVersion: pkg.version.replace(/-\w+$/, ''),
  56. + Version: `${pkg.version}.${pkg.release}`,
  57. + RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
  58. NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
  59. diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
  60. index 61659d2..5cafa06 100644
  61. --- a/resources/linux/rpm/code.spec.template
  62. +++ b/resources/linux/rpm/code.spec.template
  63. @@ -2,3 +2,3 @@ Name: @@NAME@@
  64. Version: @@VERSION@@
  65. -Release: @@RELEASE@@.el7
  66. +Release: el7
  67. Summary: Code editing. Redefined.
  68. diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
  69. index 1ae8079..0dad6ac 100644
  70. --- a/src/vs/base/common/product.ts
  71. +++ b/src/vs/base/common/product.ts
  72. @@ -34,2 +34,3 @@ export interface IProductConfiguration {
  73. readonly version: string;
  74. + readonly release: string;
  75. readonly date?: string;
  76. diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
  77. index e1c60a3..a12d52c 100644
  78. --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
  79. +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
  80. @@ -239,3 +239,3 @@ export class DiagnosticsService implements IDiagnosticsService {
  81. const output: string[] = [];
  82. - output.push(`Version: ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
  83. + output.push(`Version: ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
  84. output.push(`OS Version: ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
  85. diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
  86. index 7e63a16..74d1f26 100644
  87. --- a/src/vs/platform/product/common/product.ts
  88. +++ b/src/vs/platform/product/common/product.ts
  89. @@ -34,3 +34,3 @@ else if (typeof require?.__$__nodeRequire === 'function') {
  90. product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
  91. - const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
  92. + const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string, release: string };
  93. @@ -47,3 +47,4 @@ else if (typeof require?.__$__nodeRequire === 'function') {
  94. Object.assign(product, {
  95. - version: pkg.version
  96. + version: pkg.version,
  97. + release: pkg.release
  98. });
  99. diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
  100. index ec4ff95..36e882f 100644
  101. --- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
  102. +++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
  103. @@ -146,4 +146,5 @@ export class BrowserDialogHandler implements IDialogHandler {
  104. return localize('aboutDetail',
  105. - "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
  106. + "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nBrowser: {4}",
  107. this.productService.version || 'Unknown',
  108. + this.productService.release || 'Unknown',
  109. this.productService.commit || 'Unknown',
  110. diff --git a/src/vs/workbench/contrib/issue/browser/issueService.ts b/src/vs/workbench/contrib/issue/browser/issueService.ts
  111. index dc7430b..23def01 100644
  112. --- a/src/vs/workbench/contrib/issue/browser/issueService.ts
  113. +++ b/src/vs/workbench/contrib/issue/browser/issueService.ts
  114. @@ -67,2 +67,3 @@ export class WebIssueService implements IWorkbenchIssueService {
  115. Version: ${this.productService.version}
  116. +Release: ${this.productService.release ?? 'unknown'}
  117. Commit: ${this.productService.commit ?? 'unknown'}
  118. diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
  119. index f63b75f..8e24c02 100644
  120. --- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
  121. +++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
  122. @@ -169,4 +169,5 @@ export class NativeDialogHandler implements IDialogHandler {
  123. return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
  124. - "Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChromium: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}\nSandboxed: {8}",
  125. + "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nElectron: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}\nSandboxed: {9}",
  126. version,
  127. + this.productService.release || 'Unknown',
  128. this.productService.commit || 'Unknown',