aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dump_repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dump_repo.go')
-rw-r--r--cmd/dump_repo.go29
1 files changed, 15 insertions, 14 deletions
diff --git a/cmd/dump_repo.go b/cmd/dump_repo.go
index 0d3970466c..3a24cf6c5f 100644
--- a/cmd/dump_repo.go
+++ b/cmd/dump_repo.go
@@ -19,57 +19,58 @@ import (
"code.gitea.io/gitea/services/convert"
"code.gitea.io/gitea/services/migrations"
- "github.com/urfave/cli"
+ "github.com/urfave/cli/v2"
)
// CmdDumpRepository represents the available dump repository sub-command.
-var CmdDumpRepository = cli.Command{
+var CmdDumpRepository = &cli.Command{
Name: "dump-repo",
Usage: "Dump the repository from git/github/gitea/gitlab",
Description: "This is a command for dumping the repository data.",
Action: runDumpRepository,
Flags: []cli.Flag{
- cli.StringFlag{
+ &cli.StringFlag{
Name: "git_service",
Value: "",
Usage: "Git service, git, github, gitea, gitlab. If clone_addr could be recognized, this could be ignored.",
},
- cli.StringFlag{
- Name: "repo_dir, r",
- Value: "./data",
- Usage: "Repository dir path to store the data",
+ &cli.StringFlag{
+ Name: "repo_dir",
+ Aliases: []string{"r"},
+ Value: "./data",
+ Usage: "Repository dir path to store the data",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "clone_addr",
Value: "",
Usage: "The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "auth_username",
Value: "",
Usage: "The username to visit the clone_addr",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "auth_password",
Value: "",
Usage: "The password to visit the clone_addr",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "auth_token",
Value: "",
Usage: "The personal token to visit the clone_addr",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "owner_name",
Value: "",
Usage: "The data will be stored on a directory with owner name if not empty",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "repo_name",
Value: "",
Usage: "The data will be stored on a directory with repository name if not empty",
},
- cli.StringFlag{
+ &cli.StringFlag{
Name: "units",
Value: "",
Usage: `Which items will be migrated, one or more units should be separated as comma.