Browse Source

Use temp directories and error handling better in release process and release testing.

Jason Grout 5 years ago
parent
commit
6f72aecf04
3 changed files with 5 additions and 9 deletions
  1. 1 1
      RELEASE.md
  2. 1 4
      scripts/release_prep.sh
  3. 3 4
      scripts/release_test.sh

+ 1 - 1
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:
 

+ 1 - 4
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
 

+ 3 - 4
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