Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 52 lines (40 sloc) 1.469 kb
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
# 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-android:
@DEVICE_TYPE=android make run

test-android:
@DEVICE_TYPE=android 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/spec/
@echo "" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/spec/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/spec/
@echo "sampleapp.tests_enabled = true;" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/spec/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
Something went wrong with that request. Please try again.