build-version.patch 8.1 KB

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