Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasedocs #7113

Merged
merged 1 commit into from Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
60 changes: 39 additions & 21 deletions RELEASE.md
Expand Up @@ -69,9 +69,14 @@ Then build and install jupyterlab:
pip install -ve .
```

## How Python and NPM versions increment
## Bump version

The next step is to bump the appropriate version numbers. We use
[bump2version](https://github.com/c4urself/bump2version) to manage the Python
version, and we keep the JS versions and tags in sync with the release cycle.

Here is an example of how version numbers progress through a release process.
Choose and run an appropriate command to bump version numbers for this release.

| Command | Python Version Change | NPM Version change |
| ---------------------------------- | --------------------- | ---------------------------------- |
Expand All @@ -83,7 +88,11 @@ Here is an example of how version numbers progress through a release process.

### JS major release(s)

Command:
In a major Python release, we can have one or more JavaScript packages also have
a major bump. During the prerelease stage of a major release, if there is a
backwards-incompatible change to a JS package, bump the major version number for
that JS package:

`jlpm bump:js:major [...packages]`

Results:
Expand All @@ -93,26 +102,35 @@ Results:
- Packages that have already had a major bump in this prerelease cycle are not affected.
- All affected packages changed to match the current release type of the Python package (`alpha` or `rc`).

### Publishing Packages
## Publishing Packages

We use [bump2version](https://github.com/c4urself/bump2version) to manage the Python
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 run bumpversion major`.

- Run `jlpm run bumpversion build` to create a new `alpha` version.
- Push the commits and tags as prompted.
- Run `npm run publish:all` to publish the JS and Python packages.
Note that the use of `npm` instead of `jlpm` is
[significant on Windows](https://github.com/jupyterlab/jupyterlab/issues/6733).
Execute the suggested commands after doing a quick sanity check.
If there is a network error during JS publish, run `npm run publish:all --skip-build` to resume publish without requiring another
clean and build phase of the JS packages.
- Run `jlpm run bumpversion release` to switch to an `rc` version.
(running `jlpm run bumpversion build` will then increment `rc` versions).

### Post release candidate checklist
Currently we end up with some uncommitted changes at this step. We'll need to commit them before running the publish.

```bash
git commit -a "bump version"
```

Now publish the JS packages and build the python packages

```bash
npm run publish:all
```

If there is a network error during JS publish, run `npm run publish:all --skip-build` to resume publish without requiring another clean and build phase of the JS packages.

Note that the use of `npm` instead of `jlpm` is [significant on Windows](https://github.com/jupyterlab/jupyterlab/issues/6733).

This is a good time to sanity-check the built packages. In another terminal, create a
new environment, pip install the wheel from the `dist/` directory, and run both
`jupyter lab` and `jupyter lab build`.

## Finish

- Follow instructions printed at the end of the publish step above, including
committing changes, tagging the release, and uploading to pypi.
- Double-check what branch you are on, and push changes to the correct upstream branch with the `--tags` option.

## 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:
Expand Down
3 changes: 2 additions & 1 deletion buildutils/src/publish.ts
Expand Up @@ -59,9 +59,10 @@ commander
console.log('*'.repeat(40));
console.log('Ready to publish!');
console.log('Run these command when ready:');
console.log(`git tag v${curr}`);
console.log(`git commit -am "Publish ${curr}"`);
console.log(`git tag v${curr}`);
console.log('twine upload dist/*');
console.log('git push origin <BRANCH> --tags');
});

commander.parse(process.argv);