diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-07 19:39:26 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-07 19:39:26 -0400 |
commit | f8977f4847b8df9feec1bb5913f75401d79db876 (patch) | |
tree | 1419364509b0f53c2294fa9dbdeffb7770762033 /cmd/dump.go | |
parent | e79e4b158090bf7c5dd86ac21cd0dbf44fbc82bd (diff) | |
download | gitea-f8977f4847b8df9feec1bb5913f75401d79db876.tar.gz gitea-f8977f4847b8df9feec1bb5913f75401d79db876.zip |
Organization level webhooks
Diffstat (limited to 'cmd/dump.go')
-rw-r--r-- | cmd/dump.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/dump.go b/cmd/dump.go index 2a54db1a87..414912243c 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -24,16 +24,18 @@ var CmdDump = cli.Command{ Description: `Dump compresses all related files and database into zip file. It can be used for backup and capture Gogs server image to send to maintainer`, Action: runDump, - Flags: []cli.Flag{}, + Flags: []cli.Flag{ + cli.BoolFlag{"verbose, v", "show process details", ""}, + }, } -func runDump(*cli.Context) { +func runDump(ctx *cli.Context) { setting.NewConfigContext() models.LoadModelsConfig() models.SetEngine() log.Printf("Dumping local repositories...%s", setting.RepoRootPath) - zip.Verbose = false + zip.Verbose = ctx.Bool("verbose") defer os.Remove("gogs-repo.zip") if err := zip.PackTo(setting.RepoRootPath, "gogs-repo.zip", true); err != nil { log.Fatalf("Fail to dump local repositories: %v", err) |