-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (35 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
42 lines (35 loc) · 1.16 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
.PHONY: build build-verbose test run_tests check clean install-hooks
build:
@./scripts/build > /dev/null 2>&1
@echo "Build complete."
@echo " Functions: $$(wc -l < functions | tr -d ' ')"
@echo " Aliases: $$(grep -c '^alias ' aliases)"
@if ! git diff --quiet aliases functions bash_completion.sh 2>/dev/null; then \
echo ""; \
echo "Changed files:"; \
git diff --stat aliases functions bash_completion.sh; \
fi
build-verbose:
./scripts/build
test: run_tests
run_tests:
'./test/shared-spec.sh'
'./test/stack-spec.sh'
'./test/ssm-spec.sh'
check:
@echo "Checking if generated files are up to date..."
@./scripts/build > /dev/null 2>&1
@if git diff --quiet aliases functions bash_completion.sh; then \
echo "✓ Generated files are up to date"; \
else \
echo "✗ Generated files are out of date. Run 'make build' to update."; \
git diff --stat aliases functions bash_completion.sh; \
exit 1; \
fi
clean:
@echo "Restoring generated files to git HEAD..."
git checkout -- aliases functions bash_completion.sh
install-hooks:
@echo "Installing git hooks..."
ln -sf ../../scripts/hooks/pre-push .git/hooks/pre-push
@echo "✓ pre-push hook installed"