Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (45 loc) · 1.99 KB
/
Copy pathMakefile
File metadata and controls
57 lines (45 loc) · 1.99 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
.PHONY: install install-macos check-macos check-homebrew check-nodejs
.PHONY: install-homebrew-dependencies install-codex-acp install-terraform
.PHONY: hooks format test help
.NOTPARALLEL: install-macos
install: install-macos
# macOS installation using Homebrew
install-macos: check-macos check-homebrew check-nodejs install-homebrew-dependencies install-codex-acp install-terraform
check-macos:
@test "$(shell uname -s)" = "Darwin" || { echo "The Makefile installer supports macOS only." >&2; exit 1; }
check-homebrew:
@command -v brew >/dev/null 2>&1 || { echo "Homebrew not found. Please install Homebrew first: https://brew.sh" >&2; exit 1; }
check-nodejs:
@command -v node >/dev/null 2>&1 || { echo "Node.js not found. Please install Node.js first: https://nodejs.org/" >&2; exit 1; }
@command -v npm >/dev/null 2>&1 || { echo "npm not found. Please install npm with Node.js first: https://nodejs.org/" >&2; exit 1; }
install-homebrew-dependencies:
brew install font-hack-nerd-font
brew install ripgrep
brew install tree-sitter-cli
brew install neovim
install-codex-acp:
npm install -g @agentclientprotocol/codex-acp
install-terraform:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
# Install git hooks
hooks:
@echo "Installing git hooks..."
@cp scripts/commit-msg .git/hooks/commit-msg
@cp scripts/pre-commit .git/hooks/pre-commit
@chmod +x .git/hooks/commit-msg .git/hooks/pre-commit
@echo "Git hooks installed successfully."
# Format Lua files
format:
stylua .
# Run isolated Lua tests for config helpers
test:
XDG_STATE_HOME=/tmp/nvmegachad-test-state nvim --headless -u NONE -i NONE -l tests/run.lua
# Help target
help:
@echo "Available targets:"
@echo " install - Install dependencies for macOS"
@echo " hooks - Install commit-message and test pre-commit hooks"
@echo " format - Format Lua files with StyLua"
@echo " test - Run config helper tests (SPEC=<substring> runs matching specs)"
@echo " help - Show this help message"