forked from contentful/contentful.swift
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (35 loc) · 1.2 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
__SIM_ID=`xcrun simctl list|egrep -m 1 '$(SIM_NAME) \([^(]*\) \([^(]*\)$$'|sed -e 's/.* (\(.*\)) (.*)/\1/'`
SIM_NAME=iPhone 5s
SIM_ID=$(shell echo $(__SIM_ID))
ifeq ($(strip $(SIM_ID)),)
$(error Could not find $(SIM_NAME) simulator)
endif
WORKSPACE=Contentful.xcworkspace
.PHONY: open test integration_test setup lint coverage carthage docs
open:
open $(WORKSPACE)
clean:
rm -rf $(HOME)/Library/Developer/Xcode/DerivedData/*
clean_simulators: kill_simulator
xcrun simctl erase all
kill_simulator:
killall "Simulator" || true
test: clean clean_simulators
set -x -o pipefail && xcodebuild test -workspace $(WORKSPACE) \
-scheme Contentful_iOS -destination 'id=$(SIM_ID)' | bundle exec xcpretty -c
integration_test: clean clean_simulators
set -x -o pipefail && xcodebuild test -workspace $(WORKSPACE) \
-scheme Contentful_iOS -configuration "API_Coverage" \
-destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.3' | bundle exec xcpretty -c
setup_env:
./Scripts/setup-env.sh
lint:
swiftlint
bundle exec pod lib lint Contentful.podspec
coverage:
bundle exec slather coverage -s
carthage:
carthage build --no-skip-current --platform all
carthage archive Contentful
docs:
./Scripts/reference-docs.sh