forked from coder/agentapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (65 loc) · 1.99 KB
/
Copy pathjustfile
File metadata and controls
73 lines (65 loc) · 1.99 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# agentapi-plusplus Justfile
# Fleet-standard task runner (DAG stage 4)
# See FLEET_100TASK_DAG.md for context.
set shell := ["bash", "-cu"]
default:
@just --list
install:
#!/usr/bin/env bash
set -euo pipefail
if [ -f package.json ]; then
npm ci
elif [ -f Cargo.toml ]; then
cargo fetch
elif [ -f pyproject.toml ] || [ -f setup.py ]; then
pip install -e .[dev] 2>/dev/null || pip install -r requirements.txt 2>/dev/null || true
elif [ -f go.mod ]; then
go mod download
fi
build:
#!/usr/bin/env bash
set -euo pipefail
if [ -f package.json ]; then
npm run build 2>/dev/null || echo "no build script"
elif [ -f Cargo.toml ]; then
cargo build --workspace 2>/dev/null || cargo build
elif [ -f go.mod ]; then
go build ./...
fi
test:
#!/usr/bin/env bash
set -euo pipefail
if [ -f package.json ]; then
npm test 2>/dev/null || echo "no test script"
elif [ -f Cargo.toml ]; then
cargo test --workspace 2>/dev/null || cargo test
elif [ -f go.mod ]; then
go test ./...
elif [ -d tests ]; then
python -m pytest tests/ 2>/dev/null || echo "no python tests"
fi
lint:
#!/usr/bin/env bash
set -euo pipefail
if [ -f package.json ]; then
npm run lint 2>/dev/null || echo "no lint script"
elif [ -f Cargo.toml ]; then
cargo clippy --workspace --all-targets -- -D warnings 2>/dev/null || cargo clippy --workspace --all-targets
elif [ -f go.mod ]; then
go vet ./...
fi
fmt:
#!/usr/bin/env bash
set -euo pipefail
if [ -f package.json ]; then
npx prettier --write "**/*.{ts,tsx,js,jsx,json,md}" 2>/dev/null || echo "no prettier"
elif [ -f Cargo.toml ]; then
cargo fmt --all
elif [ -f go.mod ]; then
gofmt -w .
fi
ci: install build test lint
clean:
#!/usr/bin/env bash
set -euo pipefail
rm -rf node_modules dist target build .next coverage __pycache__ 2>/dev/null || true