forked from swiftyfinch/Rugby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (49 loc) · 1.56 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
50
51
52
53
54
55
56
57
.PHONY: debug
debug: lint
swift build --arch x86_64
.PHONY: lint
lint:
@which swiftformat || \
(printf '\e[31m⛔️ Could not find SwiftFormat.\e[m\n\e[33m🚑 Run: brew install swiftformat\e[m\n' && exit 1)
@which swiftlint || \
(printf '\e[31m⛔️ Could not find SwiftLint.\e[m\n\e[33m🚑 Run: brew install swiftlint\e[m\n' && exit 1)
swiftformat --quiet .
swiftlint --fix --quiet
swiftlint --strict --quiet
.PHONY: install
install:
swift build --arch arm64 -c release
cp -f `swift build --arch arm64 -c release --show-bin-path`/rugby ~/.rugby/clt/rugby
strip -rSTx ~/.rugby/clt/rugby
.PHONY: release
release:
rm -rf Release
mkdir -p Release
swift package clean
swift build -c release --arch x86_64
cp -f `swift build -c release --arch x86_64 --show-bin-path`/rugby Release/rugby
strip -rSTx Release/rugby
cd Release && zip -r x86_64.zip rugby
@echo
swift package clean
swift build --arch arm64 -c release
cp -f `swift build -c release --arch arm64 --show-bin-path`/rugby Release/rugby
strip -rSTx Release/rugby
cd Release && zip -r arm64.zip rugby
.PHONY: mocks
mocks:
sourcery --sources Sources/RugbyFoundation \
--sources Tests/FoundationTests \
--templates Tests/Sourcery/AutoMockable.stencil \
--output Tests/FoundationTests
sourcery --sources Sources/RugbyFoundation \
--sources Sources/Rugby \
--sources Tests/RugbyTests \
--templates Tests/Sourcery/AutoMockable.stencil \
--output Tests/RugbyTests
.PHONY: test
test:
set -o pipefail && swift test 2>&1 | xcbeautify
.PHONY: smoke
smoke:
cd Example && Tests/CacheTests.sh