-
Notifications
You must be signed in to change notification settings - Fork 115
/
Makefile
45 lines (37 loc) · 1.35 KB
/
Makefile
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
SCRIPTS_PATH := Sources/Navigator/EPUB/Scripts
help:
@echo "Usage: make <target>\n\n\
carthage-proj\tGenerate the Carthage Xcode project\n\
scripts\t\tBundle the Navigator EPUB scripts\n\
test\t\t\tRun unit tests\n\
lint-format\tVerify formatting\n\
format\t\tFormat sources\n\
"
.PHONY: carthage-project
carthage-project:
xcodegen -s Support/Carthage/project.yml --use-cache --cache-path Support/Carthage/.xcodegen
.PHONY: scripts
scripts:
@which corepack >/dev/null 2>&1 || (echo "ERROR: corepack is required, please install it first\nhttps://pnpm.io/installation#using-corepack"; exit 1)
cd $(SCRIPTS_PATH); \
rm -rf "node_modules"; \
corepack install; \
pnpm install --frozen-lockfile; \
pnpm run format; \
pnpm run lint; \
pnpm run bundle
.PHONY: update-scripts
update-scripts:
@which corepack >/dev/null 2>&1 || (echo "ERROR: corepack is required, please install it first\nhttps://pnpm.io/installation#using-corepack"; exit 1)
pnpm install --dir "$(SCRIPTS_PATH)"
.PHONY: test
test:
# To limit to a particular test suite: -only-testing:ReadiumSharedTests
xcodebuild test -scheme "Readium-Package" -destination "platform=iOS Simulator,name=iPhone 15" | xcbeautify -q
.PHONY: lint-format
lint-format:
swift run --package-path BuildTools swiftformat --lint .
.PHONY: format
f: format
format:
swift run --package-path BuildTools swiftformat .