Repository navigation
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (43 loc) · 1.58 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·55 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
#
# setup.sh - one-command bootstrap for a Stringy development environment.
#
# Stringy manages its entire toolchain (Rust, Zig, just, and friends) with mise.
# This script is a thin wrapper around that flow: it verifies mise is present,
# installs the pinned tools, and builds the test fixtures so `just test` works.
#
# It intentionally does NOT pipe a remote installer into your shell. If mise is
# missing, it prints the official install instructions and exits.
#
# Usage:
# ./setup.sh
#
# For day-to-day tasks after setup, use the just recipes (see `just --list`).
set -euo pipefail
cd "$(dirname "$0")"
if ! command -v mise >/dev/null 2>&1; then
cat >&2 <<'EOF'
error: mise is not installed.
Stringy uses mise (https://mise.jdx.dev) to manage its toolchain. Install it,
then re-run ./setup.sh. See https://mise.jdx.dev/getting-started.html
macOS/Linux (Homebrew): brew install mise
macOS/Linux (script): https://mise.jdx.dev/getting-started.html
Windows: https://mise.jdx.dev/getting-started.html#windows
After installing, make sure mise is activated in your shell, or run the commands
below through `mise exec --`.
EOF
exit 1
fi
echo "==> Installing pinned toolchain via mise"
mise trust
mise install
echo "==> Generating test fixtures (cross-compiled via Zig)"
mise exec -- just gen-fixtures
cat <<'EOF'
Setup complete. Next steps:
just build # debug build
just test # run the test suite
just lint # run the lint suite
just ci-check # full local CI parity check
Run `just --list` to see all available recipes.
EOF