mirror of
https://github.com/OBKoro1/autoCommit.git
synced 2024-12-23 01:29:20 +08:00
修复提交时的异步问题
This commit is contained in:
parent
fa47e25a6e
commit
3d7fbd196c
@ -2,6 +2,7 @@
|
||||
|
||||
# 用于学习交流
|
||||
|
||||
<!-- TODO: 18年 -->
|
||||
|
||||
<!-- TODO: 前面先选中的日期会覆盖后面的日期 -->
|
||||
|
||||
@ -9,4 +10,8 @@
|
||||
|
||||
<!-- TODO: 可以挂在后台慢慢commit -->
|
||||
|
||||
<!-- TODO: icon -->
|
||||
<!-- TODO: icon -->
|
||||
|
||||
<!-- 分支未创建 未上传问题 -->
|
||||
|
||||
<!-- 注意保持git干净,不要有未合并merge、rebase等情况 -->
|
BIN
images/icon.png
Normal file
BIN
images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -20,6 +20,7 @@
|
||||
"email": "obkoro1@foxmail.com",
|
||||
"url": "http://obkoro1.com/web_accumulate/"
|
||||
},
|
||||
"icon": "images/icon.png",
|
||||
"galleryBanner": {
|
||||
"color": "#3B4859",
|
||||
"theme": "dark"
|
||||
@ -63,6 +64,9 @@
|
||||
"github commit",
|
||||
"github autoCommit",
|
||||
"git commit",
|
||||
"自动提交",
|
||||
"git 自动提交",
|
||||
"github 自动提交",
|
||||
"git",
|
||||
"github",
|
||||
"commit",
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author : OBKoro1
|
||||
* Date : 2019-12-30 16:59:30
|
||||
* LastEditors : OBKoro1
|
||||
* LastEditTime : 2020-01-02 14:18:36
|
||||
* LastEditTime : 2020-01-02 16:22:22
|
||||
* FilePath : /autoCommit/src/models/commitHandle.ts
|
||||
* Description : commit 具体操作
|
||||
* https://github.com/OBKoro1
|
||||
@ -49,13 +49,14 @@ class CommitHandle {
|
||||
let index = this.timeArr.findIndex(element => {
|
||||
return element.value === ele;
|
||||
});
|
||||
// 添加不存在的日期
|
||||
if (index === -1) {
|
||||
this.timeArr.push({
|
||||
value: ele,
|
||||
commitNumber: item.commitNumber
|
||||
});
|
||||
// 删除重复日期
|
||||
if (index !== -1) {
|
||||
this.timeArr.splice(index, 1);
|
||||
}
|
||||
this.timeArr.push({
|
||||
value: ele,
|
||||
commitNumber: item.commitNumber
|
||||
});
|
||||
});
|
||||
});
|
||||
this.sortTime();
|
||||
@ -125,7 +126,7 @@ class CommitHandle {
|
||||
});
|
||||
});
|
||||
} catch (err) {
|
||||
continue; // 错误 退出本次循环
|
||||
continue; // 错误 退出本次循环
|
||||
}
|
||||
} else {
|
||||
// 模拟git提交
|
||||
@ -196,7 +197,7 @@ class CommitHandle {
|
||||
}
|
||||
return timeArr;
|
||||
}
|
||||
// 同步执行命令
|
||||
// 同步执行命令
|
||||
myExecSync(cmd: string) {
|
||||
// 除了该方法直到子进程完全关闭后才返回 执行完毕 返回
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user