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

Minor release fixes #957

Merged
merged 2 commits into from
Sep 10, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,20 @@ git clean -fdx

Make sure the `dist/` folder is empty.

1. If the JupyterLab extension has changed, make sure to bump the version number in `./packages/jupyterlab-preview/package.json`
2. If the Voilà front-end JavaScript has changed, make sure to bump the version number in `./packages/voila/package.json`
3. Bump the version:
1. Bump the version:
- `python -m pip install bump2version jupyter-releaser`
- For a patch release: `python scripts/bump-version patch`
- For a build release: `python scripts/bump-version build`
4. `python -m build`
5. Double check the size of the bundles in the `dist/` folder
6. Make sure the JupyterLab extension is correctly bundled in source distribution
7. Run the tests
2. `python -m build`
3. Double check the size of the bundles in the `dist/` folder
4. Make sure the JupyterLab extension is correctly bundled in source distribution
5. Run the tests
- `pip install "dist/voila-X.Y.Z-py3-none-any.whl[test]`
- `cd tests/test_template`
- `pip install tests/test_template tests/skip_template`
- `py.test`
8. `export TWINE_USERNAME=mypypi_username`
9. `twine upload dist/*`
6. `export TWINE_USERNAME=mypypi_username`
7. `twine upload dist/*`

### Committing and tagging

Expand Down
15 changes: 4 additions & 11 deletions scripts/bump-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@
# - https://github.com/jupyterlab/retrolab/blob/main/buildutils/src/release-bump.ts

import click
from jupyter_releaser.util import run
from jupyter_releaser.util import get_version, run


OPTIONS = ["major", "minor", "release", "build"]


def get_python_version():
"""Return the version of the voila Python package"""
import voila

return voila.__version__


def patch(force=False):
python_version = get_python_version()
if "a" in python_version or "b" in python_version or "rc" in python_version:
version = get_version()
if "a" in version or "b" in version or "rc" in version:
raise Exception("Can only make a patch release from a final version")

run("bumpversion patch", quiet=True)
Expand All @@ -41,7 +34,7 @@ def patch(force=False):


def update(spec, force=False):
prev = get_python_version()
prev = get_version()

# Make sure we have a valid version spec.
if spec not in OPTIONS:
Expand Down