-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (37 loc) · 1.13 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
46
47
48
49
.PHONY: docs format test lint xcode linuxmain autocorrect clean test build
APP="UB"
# Apple
ifeq ($(shell uname),Darwin)
PLATFORM=apple
XCPRETTY_STATUS=$(shell xcpretty -v &>/dev/null; echo $$?)
ifeq ($(XCPRETTY_STATUS),0)
XCPRETTY=xcpretty
else
XCPRETTY=cat
endif
endif
install_deps:
swift package resolve
ifneq ($(XCPRETTY_STATUS),0)
@echo "xcpretty not found: Run \`gem install xcpretty\` for nicer xcodebuild output.\n"
endif
clean:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
test: clean xcode install_deps
set -o pipefail && swift test | $(XCPRETTY)
build: clean xcode install_deps
set -o pipefail && swift build | $(XCPRETTY)
lint:
swiftlint
autocorrect:
swiftlint autocorrect
docs:
jazzy --clean --module UB --swift-build-tool spm --build-tool-arguments -Xswiftc,-swift-version,-Xswiftc,5 --author "Ultralight Beam" --author_url http://ultralightbeam.io --github_url https://github.com/ultralight-beam/UB.swift
echo "swift.ultralightbeam.io" > docs/CNAME
rm -rf build/
xcode:
swift package generate-xcodeproj
linuxmain:
swift test --generate-linuxmain
format:
swiftformat .