diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2040b0d..a27a232 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,4 +60,5 @@ jobs: cloc --version act --version ollama --version + tilt version codex --version diff --git a/README.md b/README.md index e9f8db0..2b3e58c 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,10 @@ The following tools are installed (or skipped if already present): | [Node.js + npm](https://nodejs.org) | `brew install node` | | [`cloc`](https://github.com/AlDanial/cloc) | `brew install cloc` | | [`act`](https://github.com/nektos/act) | `brew install act` | -| [Ollama](https://ollama.com) | `curl -fsSL https://ollama.com/install.sh | sh` | +| [Ollama](https://ollama.com) | `brew install ollama` | | [codex-cli](https://github.com/openai/codex) | `npm install -g @openai/codex` | | [Codexbar](https://github.com/steipete/CodexBar) | `brew install --cask steipete/tap/codexbar` | +| [Tilt](https://tilt.dev) | `brew install tilt` | The script is **idempotent** — re-running it is safe and will skip anything already installed. diff --git a/install.sh b/install.sh index 639f3fa..bf6ba8e 100755 --- a/install.sh +++ b/install.sh @@ -142,6 +142,14 @@ else echo "📊 Codexbar is already keeping watch from the menu bar." fi +# 17. Tilt — local dev environment orchestrator +if ! command -v tilt &>/dev/null; then + echo "🔦 Tilt not found. The dev environment needs orchestrating. Installing..." + brew install tilt +else + echo "🔦 Tilt is already illuminating the Severed Floor." +fi + echo "" echo "✅ Macrodata Refinement environment initialised." echo " The work is mysterious and important. Praise Kier. 🫱" diff --git a/test/install.bats b/test/install.bats index 60b8033..63ff76c 100644 --- a/test/install.bats +++ b/test/install.bats @@ -442,6 +442,28 @@ EOF [[ "$output" == *"Ollama is already running"* ]] } +# --------------------------------------------------------------------------- +# Tilt section +# --------------------------------------------------------------------------- + +@test "installs Tilt when tilt is not on PATH" { + run env PATH="$MOCK_BIN" /bin/bash "$SCRIPT" + [ "$status" -eq 0 ] + [[ "$output" == *"Tilt not found"* ]] +} + +@test "skips Tilt when tilt is already installed" { + cat > "$MOCK_BIN/tilt" <<'EOF' +#!/bin/bash +exit 0 +EOF + chmod +x "$MOCK_BIN/tilt" + + run bash "$SCRIPT" + [ "$status" -eq 0 ] + [[ "$output" == *"Tilt is already illuminating"* ]] +} + # --------------------------------------------------------------------------- # End-to-end: all tools already present # --------------------------------------------------------------------------- @@ -454,7 +476,7 @@ EOF @test "exits successfully when all tools are already installed" { # Stubs for every command-based tool - for tool in gcloud oc gh uvx python3 gws node cloc act ollama codex; do + for tool in gcloud oc gh uvx python3 gws node cloc act ollama codex tilt; do cat > "$MOCK_BIN/$tool" <<'EOF' #!/bin/bash exit 0 @@ -486,4 +508,5 @@ EOF [[ "$output" == *"act is already running scenes"* ]] [[ "$output" == *"Ollama is already running"* ]] [[ "$output" == *"Codexbar is already keeping watch"* ]] + [[ "$output" == *"Tilt is already illuminating"* ]] }