-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from drdavella/improve-test-script
More error checking and output in update script
- Loading branch information
Showing
1 changed file
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |