]>
Commit | Line | Data |
---|---|---|
96f02eb1 CD |
1 | #!/usr/bin/env bash |
2 | ||
3 | set -eo pipefail | |
4 | params=() | |
5 | if [ -n "$INSTANCES" ]; then | |
6 | params+=("--instances" "${INSTANCES}") | |
7 | elif [ -n "$MIN_INSTANCES" ] && [ -n "$MAX_INSTANCES" ]; then | |
8 | params+=("--min-instances" "${MIN_INSTANCES}") | |
9 | params+=("--max-instances" "${MAX_INSTANCES}") | |
10 | ||
11 | fi | |
12 | if [ -n "$FLAVOR" ]; then | |
13 | params+=("--flavor" "${FLAVOR}") | |
14 | elif [ -n "$MIN_FLAVOR" ] && [ -n "$MAX_FLAVOR" ]; then | |
15 | params+=("--min-flavor" "${MIN_FLAVOR}") | |
16 | params+=("--max-flavor" "${MAX_FLAVOR}") | |
17 | fi | |
18 | ||
19 | clever scale "${params[@]}" |