2
0
Fork 0
es5-ff-spa-loader/example/app_mobile/scripts/rename-android-apk.js
2016-01-24 21:38:21 +01:00

16 lines
569 B
JavaScript

var fs = require('fs');
module.exports = function(context) {
var Q = context.requireCordovaModule('q');
var deferral = new Q.defer();
var nameOld = 'platforms/android/build/outputs/apk/android-debug.apk';
var nameNew = 'platforms/android/build/outputs/apk/FFSpaLoaderExample.apk';
console.log('rename-android-apk start old: '+nameOld);
fs.rename(nameOld,nameNew,function(err) {
if (err) return deferral.reject(err);
console.log('rename-android-apk done new: '+nameNew);
deferral.resolve();
});
return deferral.promise;
}