From 63c54ff790edbf935027e5e11438a125e08dbe26 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 4 Jul 2016 04:59:39 +0200 Subject: [PATCH] fix push --- dist/smartgit.push.d.ts | 2 +- dist/smartgit.push.js | 10 +++++----- ts/smartgit.push.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/smartgit.push.d.ts b/dist/smartgit.push.d.ts index 07ced8f..13f40cd 100644 --- a/dist/smartgit.push.d.ts +++ b/dist/smartgit.push.d.ts @@ -1 +1 @@ -export declare let push: (dirPathArg: string, sourceArg?: string, branchArg?: string) => any; +export declare let push: (dirPathArg: string, remoteNameArg?: string, remoteBranchArg?: string) => any; diff --git a/dist/smartgit.push.js b/dist/smartgit.push.js index fcb614b..d06f61e 100644 --- a/dist/smartgit.push.js +++ b/dist/smartgit.push.js @@ -1,9 +1,9 @@ "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 = ""; } +exports.push = function (dirPathArg, remoteNameArg, remoteBranchArg) { + if (remoteNameArg === void 0) { remoteNameArg = ""; } + if (remoteBranchArg === void 0) { remoteBranchArg = ""; } var done = plugins.Q.defer(); if (!helpers.isGitDirectory(dirPathArg)) { plugins.beautylog.error("smartgit.push expects a valid git directory"); @@ -11,8 +11,8 @@ exports.push = function (dirPathArg, sourceArg, branchArg) { return done.promise; } // if everything seems allright proceed - plugins.shelljs.exec("(cd " + dirPathArg + " && git status)"); + plugins.shelljs.exec("(cd " + dirPathArg + " && git push " + remoteNameArg + " " + remoteBranchArg + ")"); done.resolve(); return done.promise; }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRnaXQucHVzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0Z2l0LnB1c2g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ixDQUFDLENBQUE7QUFDOUMsSUFBWSxPQUFPLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUVuQyxZQUFJLEdBQUcsVUFBQyxVQUFpQixFQUFFLGFBQXlCLEVBQUUsZUFBMkI7SUFBdEQsNkJBQXlCLEdBQXpCLGtCQUF5QjtJQUFFLCtCQUEyQixHQUEzQixvQkFBMkI7SUFDeEYsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixFQUFFLENBQUEsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxjQUFjLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQSxDQUFDO1FBQ3BDLE9BQU8sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLDZDQUE2QyxDQUFDLENBQUM7UUFDdkUsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQ2QsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7SUFDeEIsQ0FBQztJQUNELHVDQUF1QztJQUN2QyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxTQUFPLFVBQVUscUJBQWdCLGFBQWEsU0FBSSxlQUFlLE1BQUcsQ0FBQyxDQUFDO0lBQzNGLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUNmLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO0FBQ3hCLENBQUMsQ0FBQyJ9 \ No newline at end of file diff --git a/ts/smartgit.push.ts b/ts/smartgit.push.ts index 1194685..5b34876 100644 --- a/ts/smartgit.push.ts +++ b/ts/smartgit.push.ts @@ -1,7 +1,7 @@ import * as plugins from "./smartgit.plugins"; import * as helpers from "./smartgit.helpers"; -export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string = "") => { +export let push = (dirPathArg:string, remoteNameArg:string = "", remoteBranchArg:string = "") => { let done = plugins.Q.defer(); if(!helpers.isGitDirectory(dirPathArg)){ plugins.beautylog.error("smartgit.push expects a valid git directory"); @@ -9,7 +9,7 @@ export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string = return done.promise; } // if everything seems allright proceed - plugins.shelljs.exec(`(cd ${dirPathArg} && git status)`); + plugins.shelljs.exec(`(cd ${dirPathArg} && git push ${remoteNameArg} ${remoteBranchArg})`); done.resolve(); return done.promise; }; \ No newline at end of file