From 6f72aecf04c2961e869dd1df5d4e84bc7014a7b1 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Thu, 19 Sep 2019 11:23:36 -0700 Subject: [PATCH] Use temp directories and error handling better in release process and release testing. --- RELEASE.md | 2 +- scripts/release_prep.sh | 5 +---- scripts/release_test.sh | 7 +++---- 3 files changed, 5 insertions(+), 9 deletions(-) mode change 100644 => 100755 scripts/release_prep.sh mode change 100644 => 100755 scripts/release_test.sh diff --git a/RELEASE.md b/RELEASE.md index 69d1d95b501d..08c8b735e8fd 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -98,7 +98,7 @@ If there is a network error during JS publish, run `npm run publish:all --skip-b Note that the use of `npm` instead of `jlpm` is [significant on Windows](https://github.com/jupyterlab/jupyterlab/issues/6733). -At this point, run the `source scripts/release_test.sh` to test the wheel in +At this point, run the `./scripts/release_test.sh` to test the wheel in a fresh conda environment with and without extensions installed. Open and run the Outputs notebook and verify everything runs properly. Also add a cell with the following code and make sure the widget renders: diff --git a/scripts/release_prep.sh b/scripts/release_prep.sh old mode 100644 new mode 100755 index a28f6df89185..9d8bdb77e5de --- a/scripts/release_prep.sh +++ b/scripts/release_prep.sh @@ -6,12 +6,9 @@ else JLAB_REL_BRANCH=$1 JLAB_REL_ENV=jlabrelease_$JLAB_REL_BRANCH - WORK_DIR=$(mktemp -d) + WORK_DIR=$(mktemp -d -t $JLAB_REL_ENV) cd $WORK_DIR - conda deactivate - conda remove --all -y -n $JLAB_REL_ENV - conda create --override-channels --strict-channel-priority -c conda-forge -c anaconda -y -n $JLAB_REL_ENV notebook nodejs twine conda activate $JLAB_REL_ENV diff --git a/scripts/release_test.sh b/scripts/release_test.sh old mode 100644 new mode 100755 index bd39054f3e48..98883686a58c --- a/scripts/release_test.sh +++ b/scripts/release_test.sh @@ -1,17 +1,16 @@ # Test a release wheel in a fresh conda environment with and without installed # extensions -set -v +set -x +set -e old="${CONDA_DEFAULT_ENV}" JLAB_TEST_ENV="${CONDA_DEFAULT_ENV}_test" -TEST_DIR="$WORK_DIR/test" +TEST_DIR=$(mktemp -d -t $JLAB_TEST_ENV) conda create --override-channels --strict-channel-priority -c conda-forge -c anaconda -y -n "$JLAB_TEST_ENV" notebook nodejs twine conda activate "$JLAB_TEST_ENV" pip install dist/*.whl - -mkdir -p $TEST_DIR cp examples/notebooks/*.ipynb $TEST_DIR/ pushd $TEST_DIR