From 22f04440b47a5017d0fae21ac83ff63c44acc6ab Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Thu, 22 Aug 2019 10:07:15 -0700 Subject: [PATCH 1/4] Add a Docker file for a clean release environment --- RELEASE.md | 35 ++++++++++++++++++++++++++++++++--- release/Dockerfile | 16 ++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 release/Dockerfile diff --git a/RELEASE.md b/RELEASE.md index 0531898b9019..b3ad7bde9f23 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,6 +15,8 @@ setup instructions and for why twine is the recommended method. ## Getting a clean environment +### Clean environment with Conda + For convenience, here are commands for getting a completely clean repo. This makes sure that we don't have any extra tags or commits in our repo (especially since we will push our tags later in the process), and that we are on the master @@ -28,13 +30,40 @@ rm -rf jupyterlab conda create -c conda-forge -y -n jlabrelease notebook nodejs twine conda activate jlabrelease -git clone git@github.com:jupyterlab/jupyterlab.git +``` + +### Clean environment with Docker + +Alternatively to the conda instructions above, you can use Docker to create a new container with a fresh clone of JupyterLab. + +First, build a Docker base image. This container is customized with your git commit information. The build is cached so rebuilding it is fast and easy. + +```bash +docker build -t jlabreleaseimage release/ --build-arg "GIT_AUTHOR_NAME=`git config user.name`" --build-arg "GIT_AUTHOR_EMAIL=`git config user.email`" +``` + +Note: if you must rebuild your Docker image from scratch without the cache, you can run the same build command above with `--no-cache --pull`. + +Then run a new instance of this container: + +```bash +docker rm jlabrelease # delete any old container +docker run -it --name jlabrelease -w /usr/src/app jlabreleaseimage bash +``` + +Now you should be at a shell prompt as root inside the docker container (the prompt should be something like `root@20dcc0cdc0b4:/usr/src/app`). + +## Set up JupyterLab + +Now clone the repo and build it + +```bash +git clone https://github.com/jupyterlab/jupyterlab.git cd jupyterlab ``` Check out the branch you are doing the release from, if different from master. - -Then build and install jlpm: +Then build and install jupyterlab: ```bash pip install -ve . diff --git a/release/Dockerfile b/release/Dockerfile new file mode 100644 index 000000000000..d5f21df3bc1b --- /dev/null +++ b/release/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3 + +WORKDIR /usr/src/app + +ARG GIT_AUTHOR_NAME +ARG GIT_AUTHOR_EMAIL + +ENV GIT_AUTHOR_NAME=$GIT_AUTHOR_NAME +ENV GIT_AUTHOR_EMAIL=$GIT_AUTHOR_EMAIL + +RUN git config --global user.name "$GIT_AUTHOR_NAME" +RUN git config --global user.email "$GIT_AUTHOR_EMAIL" + +RUN apt-get update && apt-get install -y npm twine + +CMD ["bash"] From b108b278e072dc507d649623da3b45a8d7add71b Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 23 Aug 2019 08:48:36 -0700 Subject: [PATCH 2/4] Update milestone script --- scripts/milestone_check.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/milestone_check.py b/scripts/milestone_check.py index e85fd2006356..4c6efe210edb 100644 --- a/scripts/milestone_check.py +++ b/scripts/milestone_check.py @@ -15,12 +15,13 @@ print('Error: set the environment variable GITHUB_TOKEN to a GitHub authentication token (see https://github.com/settings/tokens)') exit(1) -MILESTONE='1.0' +MILESTONE='1.1' ranges = { 18: 'origin/0.35.0 --not origin/0.34.x', #0.35.0 20: 'origin/0.35.x --not v0.35.0', #0.35.x - '1.0': 'origin/master --not origin/0.35.x', + '1.0': 'origin/1.0.x --not origin/0.35.x', + '1.1': 'origin/master --not origin/1.0.x' } out = subprocess.run("git log {} --format='%H,%cE,%s'".format(ranges[MILESTONE]), shell=True, encoding='utf8', stdout=subprocess.PIPE) From 2bc4d843c78654926cdc3c8e5dfaf00704c95084 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 23 Aug 2019 08:48:53 -0700 Subject: [PATCH 3/4] prettier updates for html template --- examples/cell/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/cell/index.html b/examples/cell/index.html index dad7819b0908..587220dc1b74 100644 --- a/examples/cell/index.html +++ b/examples/cell/index.html @@ -5,11 +5,11 @@ - {% set page_config_full = {'baseUrl': base_url, 'token': token} %} + {% set page_config_full = {'baseUrl': base_url, 'token': token} %} - +