This commit is contained in:
cdle
2021-09-02 12:31:47 +08:00
parent d0caeda83d
commit 7dccdacd34
3 changed files with 62 additions and 11 deletions
+4
View File
@@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"regexp"
"runtime"
"strings"
"github.com/beego/beego/v2/core/logs"
@@ -39,6 +40,9 @@ var functions = []Function{
Rules: []string{"^升级$"},
Admin: true,
Handle: func(s im.Sender) interface{} {
if runtime.GOOS == "darwin" {
return "沙雕。"
}
s.Reply("傻妞开始拉取代码。")
rtn, err := exec.Command("sh", "-c", "cd "+ExecPath+" && git stash && git pull").Output()
if err != nil {