forked from appium-boneyard/appium-instruments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (60 loc) · 1.66 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
73
74
75
76
77
current_dir = $(shell pwd)
xcode_path:="$(shell xcode-select -print-path | sed s/\\/Contents\\/Developer//g)"
JSHINT_BIN=./node_modules/.bin/jshint
JSCS_BIN=./node_modules/.bin/jscs
DEFAULT: jshint jscs
jshint:
@$(JSHINT_BIN) lib test
jscs:
@$(JSCS_BIN) lib test
iwd: clone_iwd build_iwd export_iwd
authorize:
sudo DevToolsSecurity --enable
sudo security authorizationdb write system.privilege.taskport is-developer
sudo chown -R `whoami`: `xcode-select -print-path`/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk/Applications
clone_iwd:
mkdir -p tmp
rm -rf tmp/iwd
git clone https://github.com/facebook/instruments-without-delay.git tmp/iwd
build_iwd:
ifndef TRAVIS_BUILD_NUMBER
sudo xcode-select -switch "/Applications/Xcode-7.1.app"
endif
cd tmp/iwd && ./build.sh
sudo xcode-select -switch $(xcode_path)
export_iwd:
rm -rf thirdparty/iwd
mkdir -p thirdparty/iwd
cp -R tmp/iwd/build/* thirdparty/iwd
test: test_unit test_functional
test_unit:
./node_modules/.bin/mocha --recursive test/unit
test_functional:
./node_modules/.bin/mocha --recursive test/functional
print_env:
@echo OS X version: `sw_vers -productVersion`
@echo Xcode version: `xcodebuild build -version`
@echo Xcode path: `xcode-select -print-path`
@echo Node.js version: `node -v`
travis:
ifeq ($(CI_CONFIG),unit)
make jshint jscs print_env test_unit
else ifeq ($(CI_CONFIG),functional)
make jshint jscs print_env authorize iwd test_functional
endif
prepublish: jshint jscs iwd test
clean_trace:
rm -rf instrumentscli*.trace
.PHONY: \
DEFAULT \
jshint \
jscs \
iwd \
clone_iwd \
build_iwd \
test \
authorize \
travis \
prepublish \
print_env \
clean_trace