Skip to content

Commit

Permalink
feat: 发布 v2.1.30
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Dec 22, 2023
1 parent a33bd83 commit 69e972f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
2 changes: 1 addition & 1 deletion app/http/controllers/setting_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/http/controllers/task_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "日志已被清理")
}
Expand Down
2 changes: 1 addition & 1 deletion config/panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
7 changes: 5 additions & 2 deletions pkg/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -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存在临时文件,可能是上次更新失败导致的,请谨慎排除后重试")
}

Expand All @@ -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("备份完成")
Expand Down Expand Up @@ -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("恢复完成")

Expand Down

0 comments on commit 69e972f

Please sign in to comment.