-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
91 lines (76 loc) · 3.06 KB
/
Justfile
File metadata and controls
91 lines (76 loc) · 3.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
84
85
86
87
88
89
90
91
# SPDX-License-Identifier: PMPL-1.0-or-later
# Justfile - hyperpolymath standard task runner
set shell := ["bash", "-uc"]
default:
@just --list
# Build the project
build:
@mkdir -p .cache/cabal .cache/xdg
CABAL_DIR=$PWD/.cache/cabal XDG_CACHE_HOME=$PWD/.cache/xdg cabal build all
# Run tests
test:
@mkdir -p .cache/cabal .cache/xdg
CABAL_DIR=$PWD/.cache/cabal XDG_CACHE_HOME=$PWD/.cache/xdg cabal test all --test-show-details=direct
# Run lints
lint:
@mkdir -p .cache/cabal .cache/xdg
CABAL_DIR=$PWD/.cache/cabal XDG_CACHE_HOME=$PWD/.cache/xdg cabal check
# Clean build artifacts
clean:
@mkdir -p .cache/cabal .cache/xdg
CABAL_DIR=$PWD/.cache/cabal XDG_CACHE_HOME=$PWD/.cache/xdg cabal clean
# Format code
fmt:
@command -v ormolu >/dev/null 2>&1 && find src app test -name "*.hs" -print0 | xargs -0 ormolu -m inplace || echo "ormolu not installed — skipping format"
# Run all checks
check: lint test
# Prepare a release
release VERSION:
@echo "Release {{VERSION}} checklist:"
@echo " 1. cabal sdist"
@echo " 2. cabal test all --test-show-details=direct"
@echo " 3. reconcile ROADMAP.adoc / PROGRESS-SUMMARY.md status"
# Run panic-attacker pre-commit scan
assail:
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
# Self-diagnostic — checks dependencies, permissions, paths
doctor:
@echo "Running diagnostics for sanctify-php..."
@echo "Checking required tools..."
@command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found"
@command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found"
@echo "Checking for hardcoded paths..."
@grep -rn '$HOME\|$ECLIPSE_DIR' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' . 2>/dev/null | head -5 || echo " [OK] No hardcoded paths"
@echo "Diagnostics complete."
# Auto-repair common issues
heal:
@echo "Attempting auto-repair for sanctify-php..."
@echo "Fixing permissions..."
@find . -name "*.sh" -exec chmod +x {} \; 2>/dev/null || true
@echo "Cleaning stale caches..."
@rm -rf .cache/stale 2>/dev/null || true
@echo "Repair complete."
# Guided tour of key features
tour:
@echo "=== sanctify-php Tour ==="
@echo ""
@echo "1. Project structure:"
@ls -la
@echo ""
@echo "2. Available commands: just --list"
@echo ""
@echo "3. Read README.adoc for full overview"
@echo "4. Read EXPLAINME.adoc for architecture decisions"
@echo "5. Run 'just doctor' to check your setup"
@echo ""
@echo "Tour complete! Try 'just --list' to see all available commands."
# Open feedback channel with diagnostic context
help-me:
@echo "=== sanctify-php Help ==="
@echo "Platform: $(uname -s) $(uname -m)"
@echo "Shell: $SHELL"
@echo ""
@echo "To report an issue:"
@echo " https://github.com/hyperpolymath/sanctify-php/issues/new"
@echo ""
@echo "Include the output of 'just doctor' in your report."