-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathjustfile
53 lines (45 loc) · 1.61 KB
/
justfile
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
# Check for uv installation
check-uv:
#!/usr/bin/env sh
if ! command -v uv >/dev/null 2>&1; then
echo "uv is not installed or not found in expected locations."
case "$(uname)" in
"Darwin")
echo "To install uv on macOS, run one of:"
echo "• brew install uv"
echo "• curl -LsSf https://astral.sh/uv/install.sh | sh"
;;
"Linux")
echo "To install uv, run:"
echo "• curl -LsSf https://astral.sh/uv/install.sh | sh"
;;
*)
echo "To install uv, visit: https://github.com/astral-sh/uv"
;;
esac
exit 1
fi
# Build and serve documentation
docs: check-uv
cd docs && uv run mintlify dev
# Install development dependencies
install: check-uv
echo "this solves prefect + integrations deps into a uv.lock, so the first install is slow, subsequent syncs are fast"
# TODO: commit the uv.lock file
uv sync --dev
# Clean up environment
clean: check-uv
deactivate || true
rm -rf .venv
# TODO: consider these for GHA (https://just.systems/man/en/github-actions.html)
# - uses: extractions/setup-just@v2
# with:
# just-version: 1.5.0 # optional semver specification, otherwise latest
# for example, use just to define/use common lint commands:
# lint: check-uv
# uvx ruff check . --fix
# using it in a GHA workflow:
# - uses: extractions/setup-just@v2
# with:
# just-version: 1.5.0 # optional semver specification, otherwise latest
# - run: just lint