diff options
author | Michael Boke <michael@mbict.nl> | 2014-10-03 22:51:07 +0200 |
---|---|---|
committer | Michael Boke <michael@mbict.nl> | 2014-10-03 22:51:07 +0200 |
commit | ba1270df2d3d835b397317f133963e7b517242f1 (patch) | |
tree | 1265a142a1fd9951d30ae11648e7fbfb5806e594 /cmd/dump.go | |
parent | ba0feadc34400cb91ff23f66096884d862651cdd (diff) | |
parent | 405ee14711ab946bd709ec28a526890c40cbc03b (diff) |
Merge remote-tracking branch 'upstream/master'
Conflicts:
conf/app.ini
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 2a54db1a..41491224 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) |