Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

patch-release.js 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. "use strict";
  2. /* -----------------------------------------------------------------------------
  3. | Copyright (c) Jupyter Development Team.
  4. | Distributed under the terms of the Modified BSD License.
  5. |----------------------------------------------------------------------------*/
  6. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  7. if (k2 === undefined) k2 = k;
  8. Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  9. }) : (function(o, m, k, k2) {
  10. if (k2 === undefined) k2 = k;
  11. o[k2] = m[k];
  12. }));
  13. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  14. Object.defineProperty(o, "default", { enumerable: true, value: v });
  15. }) : function(o, v) {
  16. o["default"] = v;
  17. });
  18. var __importStar = (this && this.__importStar) || function (mod) {
  19. if (mod && mod.__esModule) return mod;
  20. var result = {};
  21. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  22. __setModuleDefault(result, mod);
  23. return result;
  24. };
  25. var __importDefault = (this && this.__importDefault) || function (mod) {
  26. return (mod && mod.__esModule) ? mod : { "default": mod };
  27. };
  28. Object.defineProperty(exports, "__esModule", { value: true });
  29. const commander_1 = __importDefault(require("commander"));
  30. const utils = __importStar(require("./utils"));
  31. // Specify the program signature.
  32. commander_1.default
  33. .description('Create a patch release')
  34. .option('--force', 'Force the upgrade')
  35. .option('--all', 'Patch all JS packages instead of the changed ones')
  36. .option('--skip-commit', 'Whether to skip commit changes')
  37. .action((options) => {
  38. utils.exitOnUuncaughtException();
  39. // Make sure we can patch release.
  40. const pyVersion = utils.getPythonVersion();
  41. if (pyVersion.includes('a') ||
  42. pyVersion.includes('b') ||
  43. pyVersion.includes('rc')) {
  44. throw new Error('Can only make a patch release from a final version');
  45. }
  46. // Run pre-bump actions.
  47. utils.prebump();
  48. // Version the changed
  49. let cmd = `lerna version patch -m \"[ci skip] New version\" --no-push`;
  50. if (options.all) {
  51. cmd += ' --force-publish=*';
  52. }
  53. if (options.force) {
  54. cmd += ' --yes';
  55. }
  56. const oldVersion = utils.run('git rev-parse HEAD', {
  57. stdio: 'pipe',
  58. encoding: 'utf8'
  59. }, true);
  60. utils.run(cmd);
  61. const newVersion = utils.run('git rev-parse HEAD', {
  62. stdio: 'pipe',
  63. encoding: 'utf8'
  64. }, true);
  65. if (oldVersion === newVersion) {
  66. console.debug('aborting');
  67. // lerna didn't version anything, so we assume the user aborted
  68. throw new Error('Lerna aborted');
  69. }
  70. // Patch the python version
  71. utils.run('bumpversion patch'); // switches to alpha
  72. utils.run('bumpversion release --allow-dirty'); // switches to beta
  73. utils.run('bumpversion release --allow-dirty'); // switches to rc.
  74. utils.run('bumpversion release --allow-dirty'); // switches to final.
  75. // Run post-bump actions.
  76. const commit = options.skipCommit !== true;
  77. utils.postbump(commit);
  78. });
  79. commander_1.default.parse(process.argv);
  80. //# sourceMappingURL=patch-release.js.map