diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 45caa0920..4f14651cd 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -1,9 +1,23 @@ #! /bin/sh +set -eu + conda_env=`conda env list | grep '*' | cut -d\ -f1` +min_conda_version="4.4" -if [ "$conda_env" == "test-cubeviz-conda" ]; then - conda update --update-deps -c glueviz/label/dev -c glueviz -c http://ssb.stsci.edu/astroconda-dev cubeviz --yes -else +if [ "$conda_env" != "test-cubeviz-conda" ]; then echo "Must be in the test-cubeviz-conda conda environment" + exit 1 +fi + +conda_version=$(conda --version | cut -d\ -f2 | cut -d. -f1,2) +if [[ "$conda_version" < "$min_conda_version" ]]; then + echo "WARNING: your conda version is out of date ($(conda --version))." \ + "This may cause issues with installing the latest version of cubeviz" \ + "and its dependencies." fi + +conda update --update-deps -c glueviz/label/dev -c glueviz -c http://ssb.stsci.edu/astroconda-dev cubeviz --yes + +echo "CubeViz test environment has been updated to the following:" +conda list "cubeviz|glue-core|specviz|specutils|spectral-cube"