| aa72eb90 Andy McCall ↶ |
1 |
.PHONY: install-server build check test fmt clippy changelog run ts install deps-check |
| 258bb382 Andy McCall ↶ |
2 |
|
| 36537112 Andy McCall ↶ |
3 |
|
| 4 |
|
| 862f0db2 Andy McCall ↶ |
5 |
PKGS = -p spectra -p spectra-core -p spectra-mcp -p spectra-api |
| 36537112 Andy McCall ↶ |
6 |
|
| 258bb382 Andy McCall ↶ |
7 |
build: |
| 8 |
cargo build --release |
| 9 |
|
| 8cfb9269 Andy McCall ↶ |
10 |
check: changelog deps-check fmt clippy test |
| 258bb382 Andy McCall ↶ |
11 |
|
| 12 |
|
| 13 |
changelog: |
| 14 |
scripts/changelog-check.sh |
| 15 |
|
| 16 |
fmt: |
| 36537112 Andy McCall ↶ |
17 |
cargo fmt $(PKGS) -- --check |
| 258bb382 Andy McCall ↶ |
18 |
|
| 19 |
clippy: |
| 36537112 Andy McCall ↶ |
20 |
cargo clippy $(PKGS) --all-targets -- -D warnings |
| 258bb382 Andy McCall ↶ |
21 |
|
| 22 |
test: |
| 36537112 Andy McCall ↶ |
23 |
cargo test $(PKGS) |
| 258bb382 Andy McCall ↶ |
24 |
|
| 25 |
run: |
| 26 |
cargo run -- --data data serve |
| 27 |
|
| 28 |
|
| 29 |
ts: |
| 30 |
cargo run -q -p spectra-api --bin spectra-api-typescript > crates/spectra-api/ts/index.d.ts |
| 31 |
|
| 32 |
|
| 33 |
install: |
| 34 |
SPECTRA_BUILD="$$(oxy --plain describe 2>/dev/null)" CARGO_INCREMENTAL=0 cargo build --release |
| aa72eb90 Andy McCall ↶ |
35 |
install -D -m 755 $${CARGO_TARGET_DIR:-$(CURDIR)/target}/release/spectra $(HOME)/.local/bin/spectra |
| 258bb382 Andy McCall ↶ |
36 |
$(HOME)/.local/bin/spectra --version |
| 37 |
|
| aa72eb90 Andy McCall ↶ |
38 |
|
| 39 |
install-server: |
| 40 |
@test -n "$(HOST)" || { echo "make install-server HOST=[USER@]HOST" >&2; exit 2; } |
| 41 |
scripts/install-server.sh $(HOST) |
| 42 |
|
| 258bb382 Andy McCall ↶ |
43 |
|
| 44 |
|
| 45 |
|
| 46 |
deps-check: |
| 47 |
scripts/deps-check.sh |