Created
October 18, 2014 18:24
-
-
Save FokkeZB/4754f93f8b325156c33c to your computer and use it in GitHub Desktop.
Revisions
-
FokkeZB created this gist
Oct 18, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,78 @@ module.exports = function(grunt) { grunt.initConfig({ settings: { releaseNotes: grunt.option('notes') || 'CI build', appName: 'Flashlight', ppUuid: '0253600x-ac6d-35b6-b66d-dd25c4fd956f', installrAppToken: '6xC0I8SdJA76kW3pqq7GFZLIyq6fBP4Z' }, titanium: { clean: { options: { command: 'clean' } }, ios: { options: { command: 'build', projectDir: './', platform: 'ios', buildOnly: true, target: 'dist-adhoc', distributionName: 'Flasher (X242ZJ33XX)', ppUuid: '<%= settings.ppUuid %>', outputDir: './dist' } }, android: { options: { command: 'build', projectDir: './', platform: 'android', buildOnly: true, outputDir: './dist' } } }, shell: { ios: { options: { stdout: true }, command: [ "curl -H 'X-InstallrAppToken: <%= settings.installrAppToken %>' https://www.installrapp.com/apps.json " + "-F 'qqfile=@./dist/<%= settings.appName %>.ipa' " + "-F 'releaseNotes=<%= settings.releaseNotes %>' " + "-F 'notify=true'" ].join("&&") }, android: { options: { stdout: true }, command: [ "curl -H 'X-InstallrAppToken: <%= settings.installrAppToken %>' https://www.installrapp.com/apps.json " + "-F 'qqfile=@./dist/<%= settings.appName %>.apk' " + "-F 'releaseNotes=<%= settings.releaseNotes %>' " + "-F 'notify=true'" ].join("&&") } }, }); grunt.loadNpmTasks('grunt-titanium'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('tiapp', function() { var tiapp = require('tiapp.xml').load(); var version = tiapp.version.split('.'); tiapp.version = version[0] + '.' + version[1] + '.' + (parseInt(version[2], 10) + 1); tiapp.write(); grunt.log.writeln(require('util').format('Bumped version to: %s', tiapp.version)); }); grunt.registerTask('default', ['tiapp', 'titanium', 'shell']); };