1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-10 04:27:22 +00:00

Migrate to urfave v3 (#34510)

migrate cli to urfave v3

add more cli tests

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
TheFox0x7
2025-06-10 14:35:12 +02:00
committed by GitHub
parent 2c341b6803
commit e9f5105e95
51 changed files with 1718 additions and 783 deletions

View File

@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/services/versioned_migration"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
// CmdMigrate represents the available migrate sub-command.
@ -22,11 +22,8 @@ var CmdMigrate = &cli.Command{
Action: runMigrate,
}
func runMigrate(ctx *cli.Context) error {
stdCtx, cancel := installSignals()
defer cancel()
if err := initDB(stdCtx); err != nil {
func runMigrate(ctx context.Context, c *cli.Command) error {
if err := initDB(ctx); err != nil {
return err
}