-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (44 loc) · 1.4 KB
/
Makefile
File metadata and controls
52 lines (44 loc) · 1.4 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
.PHONY: install uninstall test clean help
PREFIX ?= $(HOME)/.local
BINDIR = $(PREFIX)/bin
help:
@echo "kubectl-beam Makefile"
@echo ""
@echo "Targets:"
@echo " install Install kubectl-beam to $(BINDIR)"
@echo " uninstall Remove kubectl-beam from $(BINDIR)"
@echo " test Run test suite (requires bats)"
@echo " clean Remove temporary files"
@echo " help Show this help message"
install:
@echo "Installing kubectl-beam to $(BINDIR)"
@mkdir -p $(BINDIR)
@cp kubectl-beam $(BINDIR)/kubectl-beam
@chmod +x $(BINDIR)/kubectl-beam
@echo "Installation complete. Ensure $(BINDIR) is in your PATH."
@echo "Verify with: kubectl beam --version"
uninstall:
@echo "Removing kubectl-beam from $(BINDIR)"
@rm -f $(BINDIR)/kubectl-beam
@echo "Uninstallation complete"
test:
@if command -v bats >/dev/null 2>&1; then \
bats test/kubectl-beam.bats; \
else \
echo "Error: bats is not installed"; \
echo "Install with: brew install bats-core (macOS) or apt-get install bats (Linux)"; \
exit 1; \
fi
test-integration:
@if command -v bats >/dev/null 2>&1; then \
bats test/kubectl-beam-integration.bats; \
else \
echo "Error: bats is not installed"; \
echo "Install with: brew install bats-core (macOS) or apt-get install bats (Linux)"; \
exit 1; \
fi
test-all: test test-integration
clean:
@echo "Cleaning temporary files"
@find . -name "*.scap.gz" -delete
@echo "Clean complete"