Browse Source

finish cleanup and docs

Steven Silvester 6 years ago
parent
commit
5b681d871e
5 changed files with 20 additions and 70 deletions
  1. 3 1
      .github/pull_request_template.md
  2. 15 60
      RELEASE.md
  3. 1 1
      buildutils/src/bumpversion.ts
  4. 0 7
      buildutils/src/patch-release.ts
  5. 1 1
      package.json

+ 3 - 1
.github/pull_request_template.md

@@ -23,4 +23,6 @@ https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md
 
 ## Backwards-incompatible changes
 
-<!-- Describe any backwards-incompatible changes to JupyterLab public APIs. -->
+<!-- Describe any backwards-incompatible changes to JupyterLab public APIs.
+     For a backwards-incompatible change, bump the major version number(s) using
+     `jlpm run bump:js:major` with the package name(s) -->

+ 15 - 60
RELEASE.md

@@ -39,63 +39,20 @@ cd jupyterlab
 pip install -ve .
 ```
 
-### Publish the npm packages
-
-The commands below ensure the latest dependencies and built files, then change
-package versions. When one package has an effective major release, the packages
-that depend on it should also get a major release, to prevent consumers that are
-using the `^` semver requirement from getting a conflict.
-
-This command prompts you for new version numbers. It then updates version
-numbers, commits, and tags the commit. It does not publish or push the commit to
-GitHub.
-
-```bash
-jlpm run version:choose:all
-```
-
-Updating each version to the next prerelease is tedious. This command, run
-instead of the one above, automatically updates each package to the next
-prerelease for that package.
-
-```bash
-jlpm run version:prerelease:all
-```
-
-Once the version is updated, you can inspect the HEAD commit to see the version
-bumps and tags (i.e., `from-git`). The next step is to publish to npm, based on
-these tags. Note that we publish the JavaScript packages using the `next` tag
-until we are ready for the final release.
-
-```bash
-jlpm run publish:next:from-git
-```
-
-And finally, we push this HEAD commit and tags to GitHub:
-
-```bash
-git push origin master --tags
-```
-
-### Publish the Python package
+### Publish the Packages
 
 We use [bump2version](https://github.com/c4urself/bump2version) to manage the Python
-versions, with a helper node script in `buildutils` that has some JupyterLab-specific
-functionality.
-
-- Run `jlpm bumpversion release` to switch to an `rc` version
-  (run `jlpm bumpversion build` to increment `rc` versions).
-- Commit and tag and push the tag
-- Create the Python release artifacts:
+version, and we keep the JS versions and tags in sync with the release cycle.
+For a backwards-incompatible changes to JS packages, bump the major version number(s)
+using `jlpm run bump:js:major` with the package name(s). For a major release of
+JupyterLab itself, run `jlpm bumpversion major`.
 
-```bash
-rm -rf dist build
-python setup.py sdist
-python setup.py bdist_wheel --universal
-twine upload dist/*
-```
+- Run `jlpm bumversion build` to release a new `alpha` version.
+  Push the commits and tags as prompted.
+- Run `jlpm bumpversion release` to switch to an `rc` version.
+- (running `jlpm bumpversion build` will then increment `rc` versions).
 
-### Post prerelease checklist
+### Post release candidate checklist
 
 - [ ] Modify and run `python scripts/milestone_check.py` to check the issues assigned to this milestone
 - [ ] Write [release highlights](https://github.com/jupyterlab/jupyterlab/blob/master/docs/source/getting_started/changelog.rst), starting with:
@@ -126,18 +83,17 @@ twine upload dist/*
 Now do the actual final release:
 
 - [ ] Run `jlpm bumpversion release` to switch to final release
-- [ ] Make a final Python release
+- [ ] Push the commit and tags to master
 - [ ] Create a branch for the release and push to GitHub
 - [ ] Merge the PRs on the other repos and set the default branch of the
       xckd repo
-- [ ] Update the `latest` npm tags by running `jlpm run update:dist-tags` and running the commands it prints out
 - [ ] Publish to [conda-forge](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#publishing-to-conda-forge).
 
 After a few days (to allow for possible patch releases), set up development for
 the next release:
 
 - [ ] Run `jlpm bumpversion minor` to bump to alpha for the next alpha release
-- [ ] Commit and push the version update to master
+- [ ] Put the commit and tags to master
 - [ ] Release the other repos as appropriate
 - [ ] Update version for [binder](https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#update-version-for-binder)
 
@@ -234,17 +190,16 @@ shasum -a 256 dist/*.tar.gz
 - Create a PR with the version bump
 - Update `recipe/meta.yaml` with the new version and md5 and reset the build number to 0.
 
-## Making a patch release JavaScript package(s)
+## Making a patch release
 
 - Backport the change to the previous release branch
-- Run the following script, where the package is in `/packages/package-folder-name` (note that multiple packages can be given):
+- Run the following script, where the package is in `/packages/package-folder-name` (note that multiple packages can be given, or no packages for a Python-only patch release):
 
 ```bash
 jlpm run patch:release package-folder-name
 ```
 
-- Push the resulting commit and tag.
-- Create a [Python release](#Publish-the-Python-package) from the release branch
+- Push the resulting commit and tag
 
 ## Update version for binder
 

+ 1 - 1
buildutils/src/bumpversion.ts

@@ -61,7 +61,7 @@ commander
     } else if (spec === 'release' && prev.indexOf('rc') !== -1) {
       lernaVersion = 'patch';
     }
-    let cmd = `lerna version -m \"New version\" --no-push ${lernaVersion}`;
+    let cmd = `lerna version -m \"New version\" --force-publish=* --no-push ${lernaVersion}`;
     utils.run(cmd);
 
     // Our work is done if this is a major or minor bump.

+ 0 - 7
buildutils/src/patch-release.ts

@@ -8,13 +8,6 @@ import * as path from 'path';
 import * as utils from './utils';
 import { publish, prepublish } from './publish';
 
-// Make sure we have required command line arguments.
-if (process.argv.length < 3) {
-  let msg = '** Must supply a target package';
-  process.stderr.write(msg);
-  process.exit(1);
-}
-
 prepublish();
 
 // Extract the desired package target(s).

+ 1 - 1
package.json

@@ -15,8 +15,8 @@
     "build:test": "lerna run build --scope \"@jupyterlab/test-*\" --concurrency 1",
     "build:testutils": "cd testutils && jlpm run build",
     "build:utils": "cd buildutils && jlpm run build",
-    "bumpversion": "node buildutils/lib/bumpversion.js",
     "bump:js:major": "node buildutils/lib/bump-js-major.js",
+    "bumpversion": "node buildutils/lib/bumpversion.js",
     "clean": "jlpm run clean:dev && jlpm run clean:packages",
     "clean:core": "cd jupyterlab/staging && jlpm run clean",
     "clean:dev": "cd dev_mode && jlpm run clean",