UNPKG

tintan

Version:

Titanium development with style. A suite of Jake build tasks which integrate with Sublime Text and Titanium Studio. Usable on all platforms.

76 lines (70 loc) 2.98 kB
// Generated by CoffeeScript 1.6.3 (function() { var foundJavaHome, fs; fs = require('fs'); foundJavaHome = function() { var java_home; java_home = process.env.JAVA_HOME; if (!(java_home && fs.existsSync(java_home))) { console.warn("Error: JAVA_HOME not set. Will not be able to compile!"); return; } return true; }; module.exports = function(tintan) { var Tintan; Tintan = tintan.constructor; return namespace('distribute', function() { if (Tintan.appXML().targets('android')) { desc('Build final android distribution package for upload to marketplace'); task('android', { async: true }, function() { var android_avd, conf; if (!foundJavaHome()) { return; } conf = Tintan.config(); android_avd = process.env.AVD; android_avd || (android_avd = conf.envOrGet('android_avd')); return Tintan.$.tipy(['android', 'builder.py'], 'distribute', Tintan.appXML().name(), Tintan.$.android_home(), process.cwd(), Tintan.appXML().id(), conf.envOrGet('keystore'), conf.envOrGet('storepass'), conf.envOrGet('key_alias'), Tintan.$._('./'), Tintan.$.android_version(), android_avd, complete); }); } if (Tintan.appXML().targets('android')) { desc('Build android package with default debug keystore for upload to TestFlight'); task('tf-android', { async: true }, function() { var android_avd; if (!foundJavaHome()) { return; } android_avd = process.env.AVD; android_avd || (android_avd = Tintan.config().envOrGet('android_avd')); return Tintan.$.tipy(['android', 'builder.py'], 'distribute', Tintan.appXML().name(), Tintan.$.android_home(), process.cwd(), Tintan.appXML().id(), '~/.android/debug.keystore', 'android', 'androiddebugkey', Tintan.$._('./'), Tintan.$.android_version(), android_avd, complete); }); } if (Tintan.$.os === 'osx') { if (Tintan.appXML().targets('ipad')) { desc('Build final ipad distribution package for upload to marketplace'); task('ipad', { async: true }, function() { return Tintan.$.tipy(['iphone', 'builder.py'], 'distribute', Tintan.$.ios_version(), process.cwd(), Tintan.appXML().id(), Tintan.appXML().name(), 'ipad', 'retina', complete); }); } if (Tintan.appXML().targets('iphone')) { desc('Build final iphone distribution package for upload to marketplace'); return task('iphone', { async: true }, function() { return Tintan.$.tipy(['iphone', 'builder.py'], 'distribute', Tintan.$.ios_version(), process.cwd(), Tintan.appXML().id(), Tintan.appXML().name(), 'iphone', 'retina', complete); }); } } }); }; }).call(this); /* //@ sourceMappingURL=distribute.map */