forked from guilhermechapiewski/titanium-jasmine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 1.34 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
# Makefile to start Titanium Mobile project from the command line.
# More info at http://github.com/guilhermechapiewski/titanium-jasmine
PROJECT_NAME=SampleApp
PROJECT_ROOT=$(shell pwd)
run-iphone:
@DEVICE_TYPE=iphone make run
test-iphone:
@DEVICE_TYPE=iphone make test
run-ipad:
@DEVICE_TYPE=ipad make run
test-ipad:
@DEVICE_TYPE=ipad make test
run:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make run-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
test:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make test-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "sampleapp.tests_enabled = true;" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
clean:
@rm -rf ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/*
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/
@echo "Deleted: ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/*"
launch-titanium:
@echo "Building with Titanium... (DEVICE_TYPE:${DEVICE_TYPE})"
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/
@PROJECT_NAME=${PROJECT_NAME} PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=${DEVICE_TYPE} bash ${PROJECT_ROOT}/bin/titanium.sh