Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
83 lines (71 loc) · 2.06 KB
/
Copy pathjustfile
File metadata and controls
83 lines (71 loc) · 2.06 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
74
75
76
77
78
79
80
81
82
83
# Shorthand commands for peek development.
# Install just: https://github.com/casey/just
default:
just --list
# Run all workspace tests
test:
cargo test --workspace
# Format code (fix)
fmt:
cargo fmt
# Check formatting only (CI)
fmt-check:
cargo fmt --check
# Lint with Clippy (must pass with -D warnings)
lint:
cargo clippy --workspace --all-targets -- -D warnings
# Format + lint + test (full check before PR)
check: fmt-check lint test
@echo "All checks passed."
# Build release binaries for all workspace members
release:
cargo build --release --workspace
# Build and copy man page to man/peek.1 (generated by peek-process build.rs)
man:
cargo build -p peek-process
mkdir -p man
sh -c 'f=$$(find target -path "*peek-process-*" -name peek.1 -type f 2>/dev/null | head -1); [ -n "$$f" ] && cp "$$f" man/peek.1'
@echo "Man page written to man/peek.1"
# Run cargo-deny (install with: cargo install cargo-deny)
deny:
cargo deny check
# Build debug binaries (default dev build)
build:
cargo build --workspace
# Run peek with args (e.g. just run -- 1234 --resources)
run args:
cargo run -p peek-process -- {{args}}
# Publish all workspace crates to crates.io (run: cargo login first).
# Uses --allow-dirty. If a crate version already exists, skips and continues.
publish:
#!/usr/bin/env bash
set -e
pub() {
local name="$1"
out=$(cargo publish -p "$name" --allow-dirty 2>&1) || true
if echo "$out" | grep -q "already exists"; then
echo "Skipping $name: version already on crates.io"
return 0
fi
if echo "$out" | grep -q "Uploading\|Published"; then
echo "Published $name"
return 0
fi
echo "$out"
echo "Publish failed for $name"
return 1
}
pub peek-proc-reader
pub kernel-explainer
pub network-inspector
pub resource-sampler
pub signal-engine
echo "Waiting 60s for crates.io index..."
sleep 60
cargo update
sleep 45
pub peek-core
pub export-engine
pub peekd
pub peek-process
echo "Done."