diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2a74591678..8183339032 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -43,7 +43,7 @@ gitlab_urls: # Only works with GitLab 13.5+ # # Since: v1.3 - use_package_registry: false + use_package_registry: true # Set this if you set GITLAB_TOKEN to the value of CI_JOB_TOKEN. # diff --git a/app/http/controllers/setting_controller.go b/app/http/controllers/setting_controller.go index d28188bf4c..61d07bd943 100644 --- a/app/http/controllers/setting_controller.go +++ b/app/http/controllers/setting_controller.go @@ -64,7 +64,7 @@ func (r *SettingController) List(ctx http.Context) http.Response { "ssl": facades.Config().GetBool("panel.ssl"), "website_path": r.setting.Get(models.SettingKeyWebsitePath), "backup_path": r.setting.Get(models.SettingKeyBackupPath), - "user_name": user.Username, + "username": user.Username, "password": "", "email": user.Email, "port": port, diff --git a/app/http/controllers/task_controller.go b/app/http/controllers/task_controller.go index d64eda6171..8ba018ef9b 100644 --- a/app/http/controllers/task_controller.go +++ b/app/http/controllers/task_controller.go @@ -63,7 +63,7 @@ func (r *TaskController) Log(ctx http.Context) http.Response { return ErrorSystem(ctx) } - log, err := tools.Exec("tail -n 1000 " + task.Log + " | tac") + log, err := tools.Exec("tail -n 500 " + task.Log) if err != nil { return Error(ctx, http.StatusInternalServerError, "日志已被清理") } diff --git a/config/panel.go b/config/panel.go index 5982aff49b..f5aa347cf1 100644 --- a/config/panel.go +++ b/config/panel.go @@ -8,7 +8,7 @@ func init() { config := facades.Config() config.Add("panel", map[string]any{ "name": "耗子Linux面板", - "version": "v2.1.29", + "version": "v2.1.30", "ssl": config.Env("APP_SSL", false), }) } diff --git a/go.mod b/go.mod index b029169ac3..4355b921fe 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/gofiber/swagger v0.1.14 github.com/gookit/color v1.5.4 github.com/gookit/validate v1.5.1 - github.com/goravel/fiber v1.1.11-0.20231222082047-4dbfa2598536 + github.com/goravel/fiber v1.1.11-0.20231222082732-ab5faaaee0d2 github.com/goravel/framework v1.13.1-0.20231214150751-ea46f55b93db github.com/iancoleman/strcase v0.3.0 github.com/imroc/req/v3 v3.42.1 diff --git a/go.sum b/go.sum index fbe0c75717..25c8aee1af 100644 --- a/go.sum +++ b/go.sum @@ -384,8 +384,8 @@ github.com/gookit/goutil v0.6.14 h1:96elyOG4BvVoDaiT7vx1vHPrVyEtFfYlPPBODR0/FGQ= github.com/gookit/goutil v0.6.14/go.mod h1:YyDBddefmjS+mU2PDPgCcjVzTDM5WgExiDv5ZA/b8I8= github.com/gookit/validate v1.5.1 h1:rPp64QZQJM+fysGFAhKpvekQAav4Ok6sjfTs9ZtxcpA= github.com/gookit/validate v1.5.1/go.mod h1:SskOHUQokzMNt6T3r7N+N/4me/6fxDx+tmoXf/3ZQog= -github.com/goravel/fiber v1.1.11-0.20231222082047-4dbfa2598536 h1:S3wf90ueyK8LDMFA7KgW9IbTr33skfqbhreVpPmlPIA= -github.com/goravel/fiber v1.1.11-0.20231222082047-4dbfa2598536/go.mod h1:xYYb8zeglHFaJAw2g6ShNTXLXIksyYe6281Aqq6wwbc= +github.com/goravel/fiber v1.1.11-0.20231222082732-ab5faaaee0d2 h1:qEg6rlQx6QMPevK/USi2lluMG41JpBnOOojT9r2PWY4= +github.com/goravel/fiber v1.1.11-0.20231222082732-ab5faaaee0d2/go.mod h1:xYYb8zeglHFaJAw2g6ShNTXLXIksyYe6281Aqq6wwbc= github.com/goravel/file-rotatelogs/v2 v2.4.2 h1:g68AzbePXcm0V2CpUMc9j4qVzcDn7+7aoWSjZ51C0m4= github.com/goravel/file-rotatelogs/v2 v2.4.2/go.mod h1:23VuSW8cBS4ax5cmbV+5AaiLpq25b8UJ96IhbAkdo8I= github.com/goravel/framework v1.13.1-0.20231214150751-ea46f55b93db h1:RNYLT0jikBgWyfBW90VvOfhnxPr2qwYwOt9x3aMrctk= diff --git a/pkg/tools/tools.go b/pkg/tools/tools.go index e25b710d6f..a01775e326 100644 --- a/pkg/tools/tools.go +++ b/pkg/tools/tools.go @@ -403,6 +403,7 @@ func UpdatePanel(panelInfo PanelInfo) error { color.Greenln("前置检查...") if Exists("/tmp/panel-storage.zip") || Exists("/tmp/panel.conf.bak") { + color.Redln("检测到/tmp存在临时文件,可能是上次更新失败导致的,请谨慎排除后重试") return errors.New("检测到/tmp存在临时文件,可能是上次更新失败导致的,请谨慎排除后重试") } @@ -416,6 +417,7 @@ func UpdatePanel(panelInfo PanelInfo) error { return err } if !Exists("/tmp/panel-storage.zip") || !Exists("/tmp/panel.conf.bak") { + color.Redln("备份面板数据失败") return errors.New("备份面板数据失败") } color.Greenln("备份完成") @@ -468,11 +470,12 @@ func UpdatePanel(panelInfo PanelInfo) error { return err } if _, err = Exec("cp -f /tmp/panel.conf.bak /www/panel/panel.conf"); err != nil { - color.Redln("恢复面板数据失败") + color.Redln("恢复面板配置失败") return err } if !Exists("/www/panel/storage/panel.db") || !Exists("/www/panel/panel.conf") { - return errors.New("恢复面板配置失败") + color.Redln("恢复面板数据失败") + return errors.New("恢复面板数据失败") } color.Greenln("恢复完成")