forked from umputun/agterm
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (41 loc) · 2.1 KB
/
Copy pathMakefile
File metadata and controls
57 lines (41 loc) · 2.1 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
# agterm tasks — a thin front door over scripts/*.sh (the scripts stay the source of truth).
# Run `make` (or `make help`) to list targets.
INSTALL_DIR := $(HOME)/Applications
RELEASE_APP := build/DerivedData/Build/Products/Release/agterm.app
.DEFAULT_GOAL := help
.PHONY: help prep generate build run release deploy test test-app lint dist dist-linux packages-linux clean
help: ## list targets
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | \
awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-9s\033[0m %s\n", $$1, $$2}'
prep: ## build libghostty + ghostty resources (one-time, idempotent)
./scripts/setup.sh
generate: prep ## regenerate agterm.xcodeproj from project.yml
xcodegen generate
build: generate ## debug build, no launch
xcodebuild -project agterm.xcodeproj -scheme agterm -configuration Debug \
-derivedDataPath build/DerivedData build
run: ## debug build + launch (scripts/run.sh)
./scripts/run.sh
release: ## release build, no launch (scripts/build.sh)
./scripts/build.sh
deploy: release ## release build + copy to ~/Applications
rm -rf "$(INSTALL_DIR)/agterm.app"
cp -R "$(RELEASE_APP)" "$(INSTALL_DIR)/agterm.app"
@echo "installed $(INSTALL_DIR)/agterm.app"
test: ## host-free agtermCore unit tests (scripts/test.sh)
./scripts/test.sh
test-app: ## application-hosted AppKit unit tests (scripts/test-app.sh)
./scripts/test-app.sh
lint: ## swiftlint over the tree (strict — warnings fail too)
swiftlint lint --strict --quiet
dist: ## signed + notarized DMG — usage: make dist VERSION=x.y.z [PUBLISH=1]
@test -n "$(VERSION)" || { echo "usage: make dist VERSION=x.y.z [PUBLISH=1]" >&2; exit 1; }
./scripts/release.sh $(VERSION) $(if $(PUBLISH),--publish,)
dist-linux: ## self-contained Linux tarball (binary + Swift runtime + libghostty + launcher)
./scripts/dist-linux.sh
packages-linux: ## Linux tar/DEB/RPM/AppImage — usage: make packages-linux VERSION=x.y.z
@test -n "$(VERSION)" || { echo "usage: make packages-linux VERSION=x.y.z" >&2; exit 1; }
./scripts/package-linux.sh "$(VERSION)"
./scripts/verify-linux-packages.sh "$(VERSION)"
clean: ## remove build artifacts (build/)
rm -rf build