generator-appverse-ionic
Version:
Appverse Ionic generator
31 lines (28 loc) • 1.2 kB
JavaScript
;
module.exports = function (grunt) {
return {
options: {
url: 'https://' + grunt.config.get('mobileBuilder.hostname') + '/newbuilder/service_5_0',
method: 'POST',
rejectUnauthorized: false,
headers: {
'Authorization': 'Basic ' + new Buffer('username:password').toString('base64')
},
data: {
// Addresses where to email the result (separated by commas)
addressList: 'email@email.email'
},
onComplete: function (data) {
// Get build id from log and set is as grunt global variable
var pattern = /Distributed to: http(s)?:\/\[\.\.\.\]\/(\S+)<br>/
var match = pattern.exec(data);
var buildId = match[2];
grunt.option('buildId', buildId);
grunt.log.writeln('Builder server generated build with id: ' + buildId);
grunt.file.write(grunt.config.get('paths.mobileDist') + '/build.log', data);
}
},
src: '.tmp/mobile-build-bundle.zip',
dest: 'filename'
}
}