I need to use grunt-phonegap-build
, I have used this method programmatically:
grunt.loadNpmTasks('grunt-phonegap-build');
grunt.initConfig({
"phonegap-build": {
debug: {
options: {
archive:"myapp.zip",
"appId":"567576",
"user": {
"email":******,
"password":******
},
download:'dist/android.apk'
}
}
}
});
grunt.tasks('phonegap-build', {}, function(args) {
grunt.log.ok('Done running tasks.');
});
Problem is executing repeat the same process and after "done running tasks". Sometimes it executes one time. When I press the button call this function via ajax. I have no idea, can u please explain this? How to solve this?
Terminal process:
Running "phonegap-build:debug" (phonegap-build) task
>> Starting upload
>> Upload successful (HTTP 200)
>> Checking build status successful (HTTP 200)
>> Getting download location for ios successful (HTTP 302)
>> Downloading ios app
>> Checking build status successful (HTTP 200)
>> Checking build status successful (HTTP 200)
>> Downloaded ios app
Running "phonegap-build:debug" (phonegap-build) task
>> Starting upload
>> Checking build status successful (HTTP 200)
>> Checking build status successful (HTTP 200)
>> Upload successful (HTTP 200)
>> Checking build status successful (HTTP 200)
>> Getting download location for ios successful (HTTP 302)
>> Downloading android app
>> Checking build status successful (HTTP 200)
>> Checking build status successful (HTTP 200)
>> Downloaded android app
Done, without errors.
manually if i give grunt phonegap-build command in CLI. it it working fine. Can u help me?
programmatically execution the grunt is not working properly