This repository was archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Auto Setup of Cate WebAPI
Norman Fomferra edited this page May 9, 2018
·
2 revisions
Described here is how Cate Desktop performs the auto setup.
Here, $NEW_VERSION is the expected Cate WebAPI version, $OLD_VERSION is the version used found, if any.
- get set-up action info (code in
src/main/appenv.ts/getCateCliSetupInfo())- if exists
~/.cate- for each existing
~/.cate/$VERSION/cate.location:- Read Cate dir from
~/.cate/$VERSION/cate.location - if
$VERSIONis$NEW_VERSION-
set-up action: none, reuse Cate in Cate dir, old version and new version are
$NEW_VERSION
-
set-up action: none, reuse Cate in Cate dir, old version and new version are
- if
$VERSIONis$NEW_VERSION- Collect it Cate dir in list
- Read Cate dir from
- Sort collected Cate dir list by
$VERSIONin descending order - For each Cate dir in sorted Cate dirs list:
- If
$VERSIONis compatible with$NEW_VERSION:- If
$VERSIONis less than$NEW_VERSION:-
set-up action: update Cate in Cate dir, old version is
$VERSION, new version is$NEW_VERSION
-
set-up action: update Cate in Cate dir, old version is
- Else
-
set-up action: none, reuse Cate in Cate dir, old version and new version are
$NEW_VERSION
-
set-up action: none, reuse Cate in Cate dir, old version and new version are
- If
- If
- For each Cate dir in sorted Cate dirs list:
- If
$VERSIONis less than$NEW_VERSION:-
set-up action: update Cate in Cate dir, old version is
$VERSION, new version is$NEW_VERSIONCate dir is~/cate-$NEW_VERSION/
-
set-up action: update Cate in Cate dir, old version is
- If
- for each existing
-
set-up action: install Cate in Cate dir, old version is none, new version is
$NEW_VERSION
- if exists
- if set-up action is none:
- done - do nothing
- if setup-action is update Cate:
- install
cate-$NEW_VERSIONpackage into Cate env given by Cate dir
- install
- if setup-action is install Cate:
- download miniconda
- install miniconda into Cate dir
- install
cate-$NEW_VERSIONpackage into Cate env given by Cate dir
- Write Cate dir to
~/.cate/$NEW_VERSION/cate.location - done