-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (61 loc) · 2.67 KB
/
justfile
File metadata and controls
73 lines (61 loc) · 2.67 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
# Optional modules: mod? allows `just fetch` to work before .just/remote/ exists.
# Recipes below use `just` subcommands instead of dependency syntax because just
# validates dependencies at parse time, which would fail when modules aren't loaded.
mod? go '.just/remote/go.mod.just'
mod? docs '.just/remote/docs.mod.just'
mod? just '.just/remote/just.mod.just'
mod? docker '.just/remote/docker.mod.just'
mod? react '.just/remote/react.mod.just'
# --- Fetch ---
# Fetch shared justfiles from osapi-justfiles
fetch:
mkdir -p .just/remote
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/go.mod.just -o .just/remote/go.mod.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/go.just -o .just/remote/go.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/docs.mod.just -o .just/remote/docs.mod.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/docs.just -o .just/remote/docs.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/just.mod.just -o .just/remote/just.mod.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/just.just -o .just/remote/just.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/docker.mod.just -o .just/remote/docker.mod.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/docker.just -o .just/remote/docker.just
curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/react.just -o .just/remote/react.just
# --- Top-level orchestration ---
# Install all dependencies
deps:
just go::deps
just go::mod
just docs::deps
just react::deps
# Build production binary (includes embedded UI)
build:
just react::build
go build -o osapi .
# Run all tests
test: linux-tune
just just::fmt-check
just react::build
just go::test
# Generate code
generate:
redocly join --prefix-tags-with-info-prop title -o internal/controller/api/gen/api.yaml internal/controller/api/*/gen/api.yaml internal/controller/api/node/*/gen/api.yaml
just go::generate
just docs::generate
cp internal/controller/api/gen/api.yaml ui/src/sdk/gen/api.yaml
just react::generate
# Format, lint, and generate before committing
ready:
just generate
just just::fmt
just docs::fmt
just go::fmt
just go::vet
just react::fmt
just react::lint
just react::build
[linux]
linux-tune:
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
[macos]
linux-tune:
[windows]
linux-tune: