unoverse 0.1.96 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/operator/lib/deploy.sh +24 -7
- package/package.json +1 -1
package/operator/lib/deploy.sh
CHANGED
|
@@ -541,13 +541,30 @@ cmd_deploy() {
|
|
|
541
541
|
# ── ONE FLOW ────────────────────────────────────────────────────────────────
|
|
542
542
|
# Which ground, is it configured, plan it, apply it, ship it. In that order, every
|
|
543
543
|
# time, whether this is the first deploy or the fiftieth.
|
|
544
|
-
# A
|
|
545
|
-
#
|
|
546
|
-
#
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
544
|
+
# NAMING A GROUND THAT DOES NOT EXIST YET MEANS BUILD IT THERE. `unoverse deploy aws` on a
|
|
545
|
+
# universe with only a DigitalOcean ground used to answer "No aws ground here. Run
|
|
546
|
+
# unoverse deploy aws to create one" — the command just typed, refusing itself. Those
|
|
547
|
+
# words already say where this should go, so the only thing left to do is set it up.
|
|
548
|
+
#
|
|
549
|
+
# A named ground with no tfvars falls through to the create flow below and skips the
|
|
550
|
+
# "which cloud?" question, because it has been answered. An UNNAMED deploy still goes
|
|
551
|
+
# through _pick_ground, which refuses to guess between two configured grounds.
|
|
552
|
+
local cloud="" rc
|
|
553
|
+
case "${GROUND_ARG:-}" in
|
|
554
|
+
do|digitalocean) cloud="digitalocean" ;;
|
|
555
|
+
aws|amazon) cloud="aws" ;;
|
|
556
|
+
esac
|
|
557
|
+
|
|
558
|
+
if [ -n "$cloud" ]; then
|
|
559
|
+
# Named. Configured already? Then use it; otherwise create it below.
|
|
560
|
+
[ -f "$ROOT/infra/$cloud/terraform.tfvars" ] || { cmd_ground "$([ "$cloud" = "aws" ] && echo aws || echo do)" || {
|
|
561
|
+
echo ""
|
|
562
|
+
info "Once that is sorted, run ${BOLD}unoverse deploy $cloud${NC} again. It picks up right here."
|
|
563
|
+
echo ""
|
|
564
|
+
exit 1
|
|
565
|
+
}; }
|
|
566
|
+
elif [ -f "$ROOT/infra/digitalocean/terraform.tfvars" ] || [ -f "$ROOT/infra/aws/terraform.tfvars" ]; then
|
|
567
|
+
cloud=$(SELF_CMD="unoverse deploy" _pick_ground "") || exit 1
|
|
551
568
|
fi
|
|
552
569
|
|
|
553
570
|
if [ -z "$cloud" ]; then
|
package/package.json
CHANGED