-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
72 lines (54 loc) · 1.3 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Version 1.0.0
UNAME_S := $(shell uname -s)
# Lint
lint:
swiftlint autocorrect --format
swiftlint lint --quiet
lintErrorOnly:
@swiftlint autocorrect --format --quiet
@swiftlint lint --quiet | grep error
# Git
precommit: lint genLinuxTests
submodule:
git submodule init
git submodule update --recursive
# Tests
genLinuxTests:
swift test --generate-linuxmain
swiftlint autocorrect --format --path Tests/
test:
swift test -c release --skip-update --parallel --enable-code-coverage
buildRelease:
swift build -c release
# Package
latest:
swift package update
resolve:
swift package resolve
# Xcode
genXcode:
swift package generate-xcodeproj --enable-code-coverage --skip-extra-files
genXcodeOpen: genXcode
open *.xcodeproj
# Clean
clean:
swift package reset
-rm -rdf .swiftpm/xcode
-rm -rdf .build/
-rm Package.resolved
-rm .DS_Store
cleanArtifacts:
swift package clean
# Test links in README
# requires <https://github.com/tcort/markdown-link-check>
testReadme:
markdown-link-check -p -v ./README.md
brewInstallDeps: brewUpdate
brew install swiftenv
brew install swiftlint
brewSetup:
which -s brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brewUpdate: brewSetup
brew update
setupEnvironment: brewInstallDeps
open Package.swift