diff options
Diffstat (limited to 'ci/clean.sh')
-rwxr-xr-x | ci/clean.sh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/ci/clean.sh b/ci/clean.sh index 079828a0..3b0ab34f 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -2,17 +2,21 @@ set -ex -if [ ! -d environments.yaml ]; then - cp ~/joid_config/environments.yaml ./environments.yaml || true - cp ~/.juju/environments.yaml ./environments.yaml || true -fi +jujuver=`juju --version` -if [ ! -d deployment.yaml ]; then - cp ~/joid_config/deployment.yaml ./deployment.yaml || true - cp ~/.juju/deployment.yaml ./deployment.yaml || true +if [[ "$jujuver" > "2" ]]; then + if [ ! -d labconfig.yaml ]; then + cp ~/joid_config/deployment.yaml ./deployment.yaml || true + cp ~/joid_config/labconfig.yaml ./labconfig.yaml || true + cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml || true + fi +else + if [ ! -d environments.yaml ]; then + cp ~/joid_config/environments.yaml ./environments.yaml || true + cp ~/.juju/environments.yaml ./environments.yaml || true + fi fi -jujuver=`juju --version` if [[ "$jujuver" > "2" ]]; then controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployment.yaml` |