2020-05-09 18:34:07 +08:00
|
|
|
# Making a Release of Notebook
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
## Using `jupyter_releaser`
|
2020-05-09 18:34:07 +08:00
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
The recommended way to make a release is to use [`jupyter_releaser`](https://github.com/jupyter-server/jupyter_releaser#checklist-for-adoption).
|
|
|
|
|
|
|
|
## Manual Release Process
|
|
|
|
|
|
|
|
### Start from a fresh git checkout and conda environment
|
|
|
|
|
|
|
|
#### Set the release branch
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
export release_branch=master
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
#### Create the git checkout
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone git@github.com:jupyter/notebook.git
|
|
|
|
cd notebook
|
|
|
|
git checkout ${release_banch}
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
#### Create and activate the conda environment
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
conda create -n notebook-release -c conda-forge jupyter
|
|
|
|
conda activate notebook-release
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Perform a local dev install
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
pip install -ve .
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Install release dependencies
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
2021-08-26 00:57:37 +08:00
|
|
|
conda install -c conda-forge nodejs babel
|
2020-05-09 18:34:07 +08:00
|
|
|
npm install -g po2json
|
2021-08-26 00:57:37 +08:00
|
|
|
pip install jupyter_releaser # used for build dependencies (build, twine, tbump)
|
2020-05-09 18:34:07 +08:00
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Update the version
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
2021-08-26 00:57:37 +08:00
|
|
|
tbump --only-patch <new_version> # set the new version
|
2020-05-10 15:17:45 +08:00
|
|
|
python setup.py jsversion
|
2020-05-09 18:34:07 +08:00
|
|
|
git commit -am "Release $(python setup.py --version)"
|
|
|
|
git tag $(python setup.py --version)
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Create the artifacts
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
rm -rf dist
|
2021-05-13 00:04:31 +08:00
|
|
|
python -m build .
|
2020-05-09 18:34:07 +08:00
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Upload the artifacts
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
twine check dist/* && twine upload dist/*
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Change back to dev version
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
2021-08-26 00:57:37 +08:00
|
|
|
tbump --only-patch <dev_version> # Add the .dev suffix
|
2020-06-08 02:29:10 +08:00
|
|
|
python setup.py jsversion
|
2020-05-09 18:34:07 +08:00
|
|
|
git commit -am "Back to dev version"
|
|
|
|
```
|
|
|
|
|
2021-05-13 00:04:31 +08:00
|
|
|
### Push the commits and tags
|
2020-05-09 18:34:07 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git push origin ${release_branch} --tags
|
|
|
|
```
|