修复推送分支问题

This commit is contained in:
obkoro1 2020-01-02 22:15:21 +08:00
parent c880c1ddcb
commit c7cac6cd39

View File

@ -1,8 +1,8 @@
/* /*
* Author : OBKoro1 * Author : OBKoro1
* Date : 2019-12-30 16:59:30 * Date : 2019-12-30 16:59:30
* @LastEditors : OBKoro1 * LastEditors : OBKoro1
* @LastEditTime : 2020-01-02 20:45:40 * LastEditTime : 2020-01-02 22:14:59
* FilePath : /autoCommit/src/models/commitHandle.ts * FilePath : /autoCommit/src/models/commitHandle.ts
* Description : commit * Description : commit
* https://github.com/OBKoro1 * https://github.com/OBKoro1
@ -115,7 +115,7 @@ class CommitHandle {
// 异步执行命令 让出线程 打印日志 等 // 异步执行命令 让出线程 打印日志 等
commitMsg = await new Promise((resolve, reject) => { commitMsg = await new Promise((resolve, reject) => {
// TODO: git push 到当前分支 // TODO: git push 到当前分支
let cmd = `cd ${this.paramsObj.itemSrc} && git add . && git commit -m 'autoCommit' --date='${time}' && git pull && git push origin master`; let cmd = `cd ${this.paramsObj.itemSrc} && git add . && git commit -m 'autoCommit' --date='${time}' && git pull && git push`;
exec(cmd, (error, stdout, stderr) => { exec(cmd, (error, stdout, stderr) => {
if (error) { if (error) {
outputLog(`执行命令出错:${cmd}`); outputLog(`执行命令出错:${cmd}`);