feat: expanded toolchain check + install-all task #16

Merged
david merged 1 commits from feat/sample-library-cards into main 2026-06-22 10:10:43 +00:00
3 changed files with 94 additions and 0 deletions
Showing only changes of commit f804ad8a41 - Show all commits
+1
View File
@@ -22,6 +22,7 @@ init = "mkdir -p output/isos output/wavs"
docker-up = "mkdir -p output/isos output/wavs && docker compose up --build"
docker-build = "docker build -t akai-fetch ."
check-toolchain = "bash scripts/check-toolchain.sh"
install-all = "bash scripts/install-deps.sh"
check-docker-toolchain = "bash scripts/check-docker-toolchain.sh"
check-all = { run = "bash scripts/check-toolchain.sh && echo '' && bash scripts/check-docker-toolchain.sh" }
gopls = "go install golang.org/x/tools/gopls@latest"
+48
View File
@@ -123,6 +123,54 @@ else
fi
fi
echo ""
# ─── golangci-lint ──────────────────────────────────────────────────────
echo "golangci-lint:"
if command -v golangci-lint &>/dev/null; then
gcl_ver=$(golangci-lint --version 2>/dev/null)
ok "golangci-lint found: $gcl_ver"
else
warn "golangci-lint not found"
echo " Install: mise install golangci-lint"
fi
echo ""
echo "=== JS / Node ==="
echo ""
# ─── npm ────────────────────────────────────────────────────────────────
echo "npm:"
if command -v npm &>/dev/null; then
npm_ver=$(npm --version 2>/dev/null)
ok "npm found: v$npm_ver"
else
warn "npm not found"
echo " Install: mise install node"
fi
echo ""
# ─── web/ui deps (eslint, globals) ──────────────────────────────────────
echo "web/ui dependencies:"
if [ -d web/ui/node_modules ] && [ -f web/ui/node_modules/.bin/eslint ]; then
ok "web/ui/node_modules installed"
else
warn "web/ui/node_modules not installed"
echo " Install: cd web/ui && npm install"
fi
echo ""
# ─── electron deps ──────────────────────────────────────────────────────
echo "electron dependencies:"
if [ -d electron/node_modules ] && [ -f electron/node_modules/.bin/electron ]; then
ok "electron/node_modules installed"
else
warn "electron/node_modules not installed"
echo " Install: cd electron && npm install"
fi
echo ""
echo "=== JS Linting (ESLint) ==="
if [ -f web/ui/node_modules/.bin/eslint ]; then
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
# Install all project dependencies — run after check-toolchain.sh for a plan.
# Usage: ./scripts/install-deps.sh
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
cmd() { echo -e " ${YELLOW}${NC} $*"; "$@"; }
skip() { echo -e " ${GREEN}${NC} $1 (already installed)"; }
fail() { echo -e " ${RED}${NC} $1"; exit 1; }
echo "=== Installing Dependencies ==="
echo ""
# ─── mise tools ─────────────────────────────────────────────────────────
echo "mise tools (go, node, golangci-lint):"
if command -v mise &>/dev/null; then
cmd mise install
else
fail "mise not found — run: curl https://mise.run | sh"
fi
echo ""
# ─── web/ui JS deps ─────────────────────────────────────────────────────
echo "web/ui npm deps (eslint):"
if [ -f web/ui/package.json ]; then
cmd cd web/ui && npm install
else
skip "web/ui npm deps"
fi
echo ""
# ─── electron deps ──────────────────────────────────────────────────────
echo "electron npm deps:"
if [ -f electron/package.json ]; then
cmd cd electron && npm install
else
skip "electron npm deps"
fi
echo ""
echo "=== Install complete ==="