2016-07-03 02:03:15 +00:00
|
|
|
"use strict";
|
|
|
|
var plugins = require("./smartgit.plugins");
|
|
|
|
var helpers = require("./smartgit.helpers");
|
|
|
|
exports.push = function (dirPathArg, sourceArg, branchArg) {
|
|
|
|
if (sourceArg === void 0) { sourceArg = ""; }
|
|
|
|
if (branchArg === void 0) { branchArg = ""; }
|
|
|
|
var done = plugins.Q.defer();
|
|
|
|
if (!helpers.isGitDirectory(dirPathArg)) {
|
|
|
|
plugins.beautylog.error("smartgit.push expects a valid git directory");
|
|
|
|
done.reject();
|
|
|
|
return done.promise;
|
|
|
|
}
|
|
|
|
// if everything seems allright proceed
|
2016-07-04 01:49:24 +00:00
|
|
|
plugins.shelljs.exec("(cd " + dirPathArg + " && git status)");
|
2016-07-03 02:03:15 +00:00
|
|
|
done.resolve();
|
|
|
|
return done.promise;
|
|
|
|
};
|
2016-07-04 01:49:24 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRnaXQucHVzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0Z2l0LnB1c2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksT0FBTyxXQUFNLG9CQUFvQixDQUFDLENBQUE7QUFDOUMsSUFBWSxPQUFPLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUVuQyxZQUFJLEdBQUcsVUFBQyxVQUFpQixFQUFFLFNBQXFCLEVBQUUsU0FBcUI7SUFBNUMseUJBQXFCLEdBQXJCLGNBQXFCO0lBQUUseUJBQXFCLEdBQXJCLGNBQXFCO0lBQzlFLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDN0IsRUFBRSxDQUFBLENBQUMsQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUEsQ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