Skip to content

Commit

Permalink
Merge pull request #285 from drdavella/improve-test-script
Browse files Browse the repository at this point in the history
More error checking and output in update script
  • Loading branch information
Craig Jones authored Mar 12, 2018
2 parents 029302d + aa98370 commit 40a1aa0
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions scripts/update_cubeviz_test_env
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 40a1aa0

Please sign in to comment.