-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 1.03 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
# Makefile for UntoldEngineEditor
# Build the Swift package
build:
swift build
# Clean build artifact
clean:
swift package clean
# Test target
test:
swift test
# Test against the local UntoldEngine package using a stable build path
localtest:
swift test --build-path /tmp/untoldeditor-local-build
# Required SwiftFormat version
SWIFTFORMAT_VERSION := 0.60.1
# Verify installed SwiftFormat matches the required version
check-swiftformat-version:
@INSTALLED=$$(swiftformat --version 2>&1 | awk '{print $$NF}'); \
if [ "$$INSTALLED" != "$(SWIFTFORMAT_VERSION)" ]; then \
echo "Error: swiftformat $(SWIFTFORMAT_VERSION) required, but found $$INSTALLED"; \
echo "Install from: https://github.com/nicklockwood/SwiftFormat/releases/tag/$(SWIFTFORMAT_VERSION)"; \
exit 1; \
fi
# Lint Swift files using SwiftFormat
lint: check-swiftformat-version
swiftformat --lint . --swiftversion 5.8 --reporter github-actions-log
# Auto-format Swift files (for convenience)
format: check-swiftformat-version
swiftformat . --swiftversion 5.8 --quiet