unoverse 0.1.57 → 0.1.59

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.
@@ -84,7 +84,9 @@ cmd_deploy() {
84
84
  _tf_fill auth_issuer AUTH_ISSUER "AUTH_ISSUER"
85
85
  _tf_fill auth_client_id AUTH_CLIENT_ID "AUTH_CLIENT_ID"
86
86
 
87
- if grep -q "FILL_ME" "$tfv" 2>/dev/null; then
87
+ # VALUES only: the file's own header comment says the word FILL_ME, and matching
88
+ # it declared a complete file blank.
89
+ if grep -qE '=[[:space:]]*"FILL_ME"' "$tfv" 2>/dev/null; then
88
90
  echo ""
89
91
  warn "Some values are still blank in ${BOLD}infra/$cloud/terraform.tfvars${NC} — fill them, then:"
90
92
  info " cd infra/$cloud && terraform init && terraform apply"
@@ -104,7 +106,23 @@ cmd_deploy() {
104
106
  info "When ready: cd infra/$cloud && terraform init && terraform apply && cd ../.. && unoverse deploy"
105
107
  exit 0
106
108
  fi
107
- command -v terraform >/dev/null 2>&1 || { fail "terraform is not installed"; info " brew install terraform"; exit 1; }
109
+ # Terraform is one static binary: install it directly from the official release
110
+ # rather than sending anyone to brew (whose compile chain can demand Xcode Command
111
+ # Line Tools updates for a tool that needs no compiling).
112
+ if ! command -v terraform >/dev/null 2>&1; then
113
+ local REPLY2 tf_arch tf_os tf_v="1.9.8" tf_dir
114
+ read -r -p " Terraform is needed. Install it now (official binary, ~30 MB)? [Y/n] " REPLY2
115
+ [[ "$REPLY2" =~ ^[Nn]$ ]] && { fail "terraform is needed to continue"; exit 1; }
116
+ tf_arch=$(uname -m); [ "$tf_arch" = "arm64" ] || [ "$tf_arch" = "aarch64" ] && tf_arch=arm64 || tf_arch=amd64
117
+ [ "$(uname -s)" = "Darwin" ] && tf_os=darwin || tf_os=linux
118
+ tf_dir=$(mktemp -d)
119
+ curl -fsSL -o "$tf_dir/tf.zip" "https://releases.hashicorp.com/terraform/${tf_v}/terraform_${tf_v}_${tf_os}_${tf_arch}.zip" && unzip -o -q "$tf_dir/tf.zip" -d "$tf_dir" || { fail "download failed"; exit 1; }
120
+ if [ -w /usr/local/bin ]; then mv "$tf_dir/terraform" /usr/local/bin/terraform
121
+ else sudo mv "$tf_dir/terraform" /usr/local/bin/terraform || { fail "could not install to /usr/local/bin"; exit 1; }
122
+ fi
123
+ rm -rf "$tf_dir"
124
+ ok "terraform $(terraform version | head -1 | awk '{print $2}') installed"
125
+ fi
108
126
  terraform -chdir="$ROOT/infra/$cloud" init -input=false >/dev/null 2>&1 || { fail "terraform init failed"; exit 1; }
109
127
  terraform -chdir="$ROOT/infra/$cloud" apply || { fail "apply did not complete. Re-run: unoverse deploy"; exit 1; }
110
128
  echo ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.57",
3
+ "version": "0.1.59",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",