-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 1.7 KB
/
Makefile
File metadata and controls
51 lines (40 loc) · 1.7 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
INSTALL_DIR := $(HOME)/.local/bin
VERSION := $(shell grep 'static let version' pippin/Version.swift | sed 's/.*"\(.*\)"/\1/')
.PHONY: build test lint install completions version release tarball clean link-skills
build:
swift build -c release
test:
swift test
lint:
swiftformat --lint pippin/ pippin-entry/ Tests/ 2>/dev/null || echo "swiftformat not installed — skipping lint"
completions: build
@mkdir -p "$(HOME)/.zfunc"
"$$(swift build -c release --show-bin-path)/pippin" completions zsh > "$(HOME)/.zfunc/_pippin"
@echo "Installed: ~/.zfunc/_pippin"
@echo "Add 'fpath=(~/.zfunc \$$fpath)' to ~/.zshrc, then 'autoload -Uz compinit && compinit'"
install: build completions
@mkdir -p "$(INSTALL_DIR)"
cp "$$(swift build -c release --show-bin-path)/pippin" "$(INSTALL_DIR)/pippin"
@echo "Installed: $(INSTALL_DIR)/pippin ($(VERSION))"
@echo "Run 'pippin init' to check permissions."
version:
@echo $(VERSION)
release: build
@mkdir -p .build/release-artifacts
cp "$$(swift build -c release --show-bin-path)/pippin" ".build/release-artifacts/pippin-$(VERSION)-arm64-macos"
@echo "Release binary: .build/release-artifacts/pippin-$(VERSION)-arm64-macos"
tarball: release
cd .build/release-artifacts && tar czf pippin-$(VERSION)-arm64-macos.tar.gz pippin-$(VERSION)-arm64-macos
@echo "Tarball: .build/release-artifacts/pippin-$(VERSION)-arm64-macos.tar.gz"
clean:
swift package clean
rm -rf .build/release-artifacts
link-skills:
@mkdir -p .claude/skills
@for skill in docs/skills/*/; do \
[ -d "$$skill" ] || continue; \
name=$$(basename "$$skill"); \
target="../../docs/skills/$$name"; \
ln -sfn "$$target" ".claude/skills/$$name" || exit 1; \
echo "Linked: .claude/skills/$$name -> $$target"; \
done