-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
74 lines (62 loc) · 2.67 KB
/
justfile
File metadata and controls
74 lines (62 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
74
mod bench "bench/bench.just"
mod website "website/website.just"
set shell := ["bash", "-euo", "pipefail", "-c"]
# Pre-review gate
check: fmt-check lint cargo-build test bench::smoke bench::resilience website::lint website::build
# cargo fmt --check
fmt-check:
cargo fmt --all -- --check
# cargo clippy matching CI: slim and default, all targets
lint:
cargo clippy --quiet --all-targets -p wallhack-cli --no-default-features --features slim -- -D warnings
cargo clippy --quiet --all-targets -- -D warnings
# Build slim and default profiles
cargo-build:
cargo build --quiet -p wallhack-cli --no-default-features --features slim
cargo build --quiet
# Cargo unit tests
test:
cargo test --quiet --all
# Build release binary with all transports (glibc, for development/IDE)
build-release:
cargo build --quiet --release --features full
# Build musl binary for range VMs (slim + vsock for IPC) and glibc MCP binary for host
build-range:
cargo build --quiet --release --target x86_64-unknown-linux-musl -p wallhack-cli --no-default-features --features slim,vsock
cargo build --quiet --release -p wallhack-mcp
# Delete local branches that have been merged and deleted on origin
clean-branches:
git fetch -p
git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -d
# TRIPLE: Open a PR using TASK.md for title and body
open-pr:
#!/usr/bin/env bash
set -euo pipefail
test -f TASK.md || { echo "TASK.md not found. Create it first (see TRIPLE.md)."; exit 1; }
title=$(awk '/^# /{sub(/^# /, ""); print; exit}' TASK.md)
gh pr create --title "$title" --body-file TASK.md --
# TRIPLE: Merge the PR for the current branch (rebase merge)
do-merge:
#!/usr/bin/env bash
set -euo pipefail
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "Uncommitted changes present — commit or stash before merging."
git status --short
exit 1
fi
branch=$(git rev-parse --abbrev-ref HEAD)
local=$(git rev-parse HEAD)
remote=$(git rev-parse "origin/$branch" 2>/dev/null) || { echo "No remote tracking branch found. Push first."; exit 1; }
[ "$local" = "$remote" ] || { echo "Local and remote are out of sync. Push first."; exit 1; }
pr=$(gh pr view --json number --jq '.number') || { echo "No open PR found for this branch."; exit 1; }
[ -n "$pr" ] || { echo "Could not determine PR number."; exit 1; }
gh pr merge "$pr" --rebase --delete-branch
git fetch upstream
git checkout main
git merge --ff-only upstream/main
git push origin main
update-agents:
git submodule update --remote
cp AGENTS.md CLAUDE.md
cp AGENTS.md GEMINI.md
cp AGENTS.md .github/copilot-instructions.md