我需要使用grunt-phonegap-build
,我以编程方式使用了此方法:
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.');
});
问题是在“完成运行任务”之后重复执行相同的过程。有时它会执行一次。当我按下按钮时,通过 ajax 调用此函数。我不知道,你能解释一下吗?如何解决这个问题?
终端流程:
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.
如果我在 CLI 中给出 grunt phonegap-build 命令,则手动进行。它工作正常。你能帮我吗?
以编程方式执行咕噜声无法正常工作