-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
123 lines (102 loc) · 3.81 KB
/
Copy pathMakefile
File metadata and controls
123 lines (102 loc) · 3.81 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Makefile for zsh-lazy-env
.PHONY: test test-verbose test-parallel test-core test-integration test-all clean help lint demo install hermit-status
# Default target
all: test
# Run all tests
test:
@echo "Running test suite..."
@./tests/run-tests.zsh
# Run tests with verbose output
test-verbose:
@echo "Running test suite (verbose)..."
@./tests/run-tests.zsh --verbose
# Run tests in parallel
test-parallel:
@echo "Running test suite (parallel)..."
@./tests/run-tests.zsh --parallel
# Run core functionality tests only
test-core:
@echo "Running core functionality tests..."
@./tests/run-tests.zsh --filter core-functions
# Run integration tests only
test-integration:
@echo "Running integration tests..."
@./tests/run-tests.zsh --filter integration
# Run all test categories individually
test-all:
@echo "Running all test categories..."
@./tests/run-tests.zsh --filter core-functions
@./tests/run-tests.zsh --filter directory-scoped
@./tests/run-tests.zsh --filter listing-functions
@./tests/run-tests.zsh --filter error-handling
@./tests/run-tests.zsh --filter integration
# Run linting
lint:
@echo "Running shellcheck on plugin..."
@./bin/shellcheck lazy-env.plugin.zsh
@echo "Running shellcheck on tests..."
@for file in tests/*.zsh; do \
echo "Checking $$file..."; \
timeout 30s ./bin/shellcheck "$$file" || echo "Warning: shellcheck failed or timed out for $$file"; \
done
@echo "Shellcheck completed"
# Run interactive demo
demo:
@echo "Starting interactive demo..."
@zsh examples/demo-core.zsh
# Run demo in autoplay mode (for asciinema recordings)
demo-auto:
@echo "Starting autoplay demo (3s delays)..."
@AUTOPLAY=true zsh examples/demo-core.zsh
# Run demo in asciinema-friendly mode (ASCII icons)
demo-asciinema:
@echo "Starting asciinema-friendly demo..."
@ASCIINEMA_MODE=true AUTOPLAY=true zsh examples/demo-core.zsh
# Clean test artifacts
clean:
@echo "Cleaning test artifacts..."
@rm -rf test-results/
@rm -rf coverage/
@rm -f *.log
@rm -f *.tmp
# Install plugin locally (for development)
install:
@echo "Installing plugin to ~/.local/share/zsh-lazy-env/..."
@mkdir -p ~/.local/share/zsh-lazy-env
@cp lazy-env.plugin.zsh ~/.local/share/zsh-lazy-env/
@cp -r examples ~/.local/share/zsh-lazy-env/
@echo "Add this to your ~/.zshrc:"
@echo "source ~/.local/share/zsh-lazy-env/lazy-env.plugin.zsh"
# Install from GitHub (production)
install-from-git:
@echo "Cloning from GitHub..."
@git clone https://github.com/dtomasi/zsh-lazy-env.git ~/.local/share/zsh-lazy-env
@echo "Add this to your ~/.zshrc:"
@echo "source ~/.local/share/zsh-lazy-env/lazy-env.plugin.zsh"
@echo "Or with zinit: zinit load 'dtomasi/zsh-lazy-env'"
# Check plugin is working
check:
@echo "Checking plugin functionality..."
@./bin/activate-hermit && zsh -c "source lazy-env.plugin.zsh; lazy_var 'TEST' 'echo test-value'; lazy_load 'TEST'; echo 'Plugin check: \$$TEST = '\$$TEST"
# Show hermit tools
hermit-status:
@echo "Hermit tools status:"
@./bin/hermit status
# Show help
help:
@echo "Available targets:"
@echo " test - Run all tests"
@echo " test-verbose - Run tests with verbose output"
@echo " test-parallel - Run tests in parallel"
@echo " test-core - Run core functionality tests only"
@echo " test-integration - Run integration tests only"
@echo " test-all - Run all test categories individually"
@echo " lint - Run shellcheck linting (uses hermit)"
@echo " demo - Run interactive demo"
@echo " demo-auto - Run demo in autoplay mode (for recordings)"
@echo " clean - Clean test artifacts"
@echo " install - Install plugin locally for development"
@echo " install-from-git - Install from GitHub repository"
@echo " check - Quick functionality check"
@echo " hermit-status - Show hermit tools status"
@echo " help - Show this help message"