-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) Β· 1.31 KB
/
Makefile
File metadata and controls
43 lines (35 loc) Β· 1.31 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
# Ruby Butler Testing
# Distinguished testing orchestration
.PHONY: spec cargo docker
# Build release binary
cargo:
@echo "π¨ Building release binary..."
cargo build --release
# Build Docker image for testing
docker:
@echo "π³ Building Docker test image..."
docker compose build
# Run ShellSpec tests using Docker Compose
spec: cargo docker
@echo "π Running ShellSpec tests with distinguished parallel execution..."
./shellspec
# Format shell scripts (trailing whitespace + final newline only)
fmt-shell:
@echo "β¨ Formatting shell scripts..."
@find spec -name "*.sh" -type f -exec sed -i 's/[[:space:]]*$$//' {} \;
@find spec -name "*.sh" -type f -exec sh -c 'tail -c1 "$$1" | read -r _ || echo >> "$$1"' _ {} \;
@echo "β
Shell script formatting complete"
# Check shell scripts for common issues
lint-shell:
@echo "π Linting shell scripts..."
@shellcheck spec/**/**/*.sh spec/**/*.sh
# Format YAML files (trailing whitespace + final newline only)
fmt-yaml:
@echo "β¨ Formatting YAML files..."
@find .github -name "*.yml" -type f -exec sed -i 's/[[:space:]]*$$//' {} \;
@find .github -name "*.yml" -type f -exec sh -c 'tail -c1 "$$1" | read -r _ || echo >> "$$1"' _ {} \;
@echo "β
YAML formatting complete"
# Check YAML files
lint-yaml:
@echo "π Linting YAML files..."
@yamllint .github/workflows/