-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
41 lines (34 loc) · 953 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
PROJECT_NAME = MockUserDefaults
ver = 2.4.0
.SILENT:
test:
rm -rf test_output
xcrun -sdk macosx xcodebuild \
-scheme ${PROJECT_NAME} \
-destination 'platform=macOS' \
-enableCodeCoverage=YES \
-resultBundlePath "test_output/test_result.xcresult" \
test | xcpretty
xed test_output/test_result.xcresult
release:
@scripts/release.sh ${PROJECT_NAME} ${ver}
ignore:
curl -sS -L https://www.gitignore.io/api/swift,swiftpm,xcode,macos \
| sed -E 's/^# (Pods\/)/\1/g' \
| sed -E 's/^# (Carthage\/)/\1/g' \
| sed -E 's/^(Carthage\/).*/\1/g' \
| sed -E 's/^# (\.swiftpm)/\1/g' \
| sed 's/^\*.xcodeproj$$//g' \
| sed '/^#/d' \
| awk '(/^$$/ || !a[$$0]++){print}' \
| uniq \
> .gitignore
echo 'test_output' >> .gitignore
demo_app:
xed DemoApp/${PROJECT_NAME}Demo.xcworkspace
test_demo:
cd DemoApp/${PROJECT_NAME}DemoLib && \
xcrun xcodebuild \
-scheme '${PROJECT_NAME}DemoLib' \
-destination 'platform=macOS' \
test | xcpretty