CB-12169: Check for build directory before running a clean

This commit is contained in:
Joe Bowser
2016-11-21 14:41:14 -08:00
parent 3bfeda4a3b
commit 5017e2302b
2 changed files with 15 additions and 2 deletions
+9
View File
@@ -197,5 +197,14 @@ AndroidProject.prototype.getUninstaller = function (type) {
return pluginHandlers.getUninstaller(type);
};
/*
* This checks if an Android project is clean or has old build artifacts
*/
AndroidProject.prototype.isClean = function() {
var build_path = path.join(this.projectDir, "build");
//If the build directory doesn't exist, it's clean
return !(fs.existsSync(build_path));
};
module.exports = AndroidProject;