Skip to content

Commit 40a1aa0

Browse files
author
Craig Jones
authored
Merge pull request #285 from drdavella/improve-test-script
More error checking and output in update script
2 parents 029302d + aa98370 commit 40a1aa0

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

scripts/update_cubeviz_test_env

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
#! /bin/sh
22

3+
set -eu
4+
35
conda_env=`conda env list | grep '*' | cut -d\ -f1`
6+
min_conda_version="4.4"
47

5-
if [ "$conda_env" == "test-cubeviz-conda" ]; then
6-
conda update --update-deps -c glueviz/label/dev -c glueviz -c http://ssb.stsci.edu/astroconda-dev cubeviz --yes
7-
else
8+
if [ "$conda_env" != "test-cubeviz-conda" ]; then
89
echo "Must be in the test-cubeviz-conda conda environment"
10+
exit 1
11+
fi
12+
13+
conda_version=$(conda --version | cut -d\ -f2 | cut -d. -f1,2)
14+
if [[ "$conda_version" < "$min_conda_version" ]]; then
15+
echo "WARNING: your conda version is out of date ($(conda --version))." \
16+
"This may cause issues with installing the latest version of cubeviz" \
17+
"and its dependencies."
918
fi
19+
20+
conda update --update-deps -c glueviz/label/dev -c glueviz -c http://ssb.stsci.edu/astroconda-dev cubeviz --yes
21+
22+
echo "CubeViz test environment has been updated to the following:"
23+
conda list "cubeviz|glue-core|specviz|specutils|spectral-cube"

0 commit comments

Comments
 (0)