-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 1018 Bytes
/
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
.PHONY: docs format test lint xcode linuxmain autocorrect clean test build
APP="Relayer"
# 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 --author "Ultralight Beam" --author_url http://ultralightbeam.io --github_url https://github.com/ultralight-beam/Relayer.swift
rm -rf build/
xcode:
swift package generate-xcodeproj
linuxmain:
swift test --generate-linuxmain
format:
swiftformat .