{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Releasing\n",
    "\n",
    "`jupyterlab-lsp` and `jupyter-lsp` releases may require building both the python\n",
    "package and nodejs packages."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Updating Version Strings\n",
    "\n",
    "Use the `bump_versions` script to manage the version strings:\n",
    "\n",
    "```bash\n",
    "python scripts/bump_versions.py\n",
    "```\n",
    "\n",
    "Check the version strings across the various files:\n",
    "\n",
    "```bash\n",
    "python scripts/integrity.py\n",
    "```\n",
    "\n",
    "- TODO: create a `release.py` script\n",
    "  [#88](https://github.com/krassowski/jupyterlab-lsp/issues/88)\n",
    "\n",
    "The PyPI version (jupyter-lsp) must be updated in the following places:\n",
    "\n",
    "- `python_packages/jupyter_lsp/jupyter_lsp/_version.py` (canonical)\n",
    "- `.github/workflows/job.test.yml`\n",
    "- `CHANGELOG.md`\n",
    "\n",
    "The npm version of `jupyterlab-lsp` must be updated in the following places:\n",
    "\n",
    "- `packages/jupyterlab-lsp/package.json` > `version` (canonical)\n",
    "- `.github/workflows/job.test.yml`\n",
    "- `packages/metapackage/package.json`\n",
    "- `CHANGELOG.md`\n",
    "\n",
    "The npm version of `lsp-ws-connection` must be updated in the following places:\n",
    "\n",
    "- `packages/lsp-ws-connection/package.json` > `version` (canonical)\n",
    "- `packages/jupyterlab-lsp/package.json`\n",
    "- `CHANGELOG.md`\n",
    "\n",
    "The JupyterLab version (if a newer is supported or required) needs to be updated\n",
    "in:\n",
    "\n",
    "- `packages/jupyterlab-lsp/package.json` > `devDependencies` >\n",
    "  `@jupyterlab/application` (canonical)\n",
    "- `binder/environment.yml`\n",
    "- `requirements/lab.txt`\n",
    "- `.github/workflows/job.test.yml`\n",
    "- `README.md`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Releasing:\n",
    "\n",
    "> Note: \"smoke source install\" step on CI will fail when bumping internal\n",
    "> dependencies until those are published on NPM. Make sure to release those\n",
    "> first and re-run this check then.\n",
    "\n",
    "```bash\n",
    "cd packages/lsp-ws-connection\n",
    "npm publish --access public\n",
    "cd -\n",
    "cd packages/completion-theme\n",
    "npm publish --access public\n",
    "cd -\n",
    "cd packages/theme-material\n",
    "npm publish --access public\n",
    "cd -\n",
    "cd packages/theme-vscode\n",
    "npm publish --access public\n",
    "cd -\n",
    "cd packages/jupyterlab-lsp\n",
    "npm publish --access public\n",
    "cd -\n",
    "./scripts/publish_pypi.sh\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}