Commit Graph

71 Commits

Author SHA1 Message Date
Thomas Boerger 5b5af7daee
Made linter happy in cmd folder 2016-11-04 23:45:06 +01:00
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Kim "BKC" Carlbäcker 4f40019130 codegangsta/cli => urfave/cli (#3546) 2016-08-30 04:57:58 -07:00
Thibault Meyer 2c5411b00c Fix #3361: Dumps are created world readable (#3473)
* Set dump file permission to 0600

* Typo
2016-08-17 11:38:42 -07:00
Alex Myasoedov 84d9aff8a2 gogs dump tempdir flag (#3086) 2016-05-23 17:10:05 -07:00
Unknwon 7826eae452 #3045 fix DEPRECATED Action signature erorr 2016-05-12 14:32:28 -04:00
kakwa 1d7a1b6034 add name of the dump file in last log message 2015-11-28 15:22:10 +01:00
kakwa a59b1fcc21 Fix dump of log and custom directory in dump cmd
Now, the dump cmd uses setting.CustomPath and setting.LogRootPath
instead of setting.WorkDir which was kind of broken if the gogs
binary was in a different directory than gogs data.
Additionally, the backup of setting.CustomPath directory is only done
if it exists.
2015-11-28 15:08:50 +01:00
kakwa c5a9be9115 Using a tmp dir to generate db and repo dumps
Using a tmp dir makes gogs dump more robust to concurrent runs.

It also permits an easier cleaning of the tmp files (gogs-db.sql and
gog-repo.zip) by just removing the tmp dir.

As a side effect, it partially fix bugs on workdir.
Previously, 'gogs dump' created the archives in the current directory,
and tried to include these archives from the directory where the
gogs binary lies.
ex: if gogs binary is in /usr/bin/gogs, and gogs dump is run from /tmp/,
/tmp/gog-repo.zip is created, but gogs dump tried to include
/usr/bin/gogs-repo.zip.
2015-11-28 14:07:51 +01:00
kakwa f86afb04a2 Adding more error handling in dump cmd
The dump cmd did not check the return value of the z.AddFile or
z.AddDir when building the final archive.
It caused the dump command to succeed even if an error occurred.
The resulted dump archive could be corrupted/empty.
(errors could be various: removal by a concurrent process, disk full,
bugs in the dump cmd itself)
2015-11-28 12:11:38 +01:00
Unknwon e030109b5a fix api broken 2015-11-15 17:07:44 -05:00
Unknwon e75fd2f783 simplify names 2015-09-16 23:08:46 -04:00
Unknwon f15fa9167a cmd: code fix for #905
- routers/admin: add rewrite update hook operation
- conf/locale: update locale file due to ini behavior changes
- cmd/cert_stub.go: remove useless code
- cmd/fix.go: no longer need fix command(at least now)
2015-02-08 21:26:14 -05:00
Peter Smit 1ab09e4f1b Add option to provide configuration file on command line 2015-02-05 12:17:35 +02:00
chai2010 f9ad8d6903 Fix #656 2014-11-24 10:58:39 +08:00
Unknwon b2632dec09 Page: Compare 2 commits 2014-10-10 21:40:51 -04:00
Unknwon f8977f4847 Organization level webhooks 2014-09-07 19:39:26 -04:00
Unknown 688ec6ecbd Fixed #209 2014-05-25 20:11:25 -04:00
Unknown c1eb4d894a Clean api code 2014-05-05 13:08:01 -04:00
Unknown a641854cad command dump 2014-05-05 00:55:17 -04:00
Unknown 3bd5fc6d6f Add command dump and move to cmd did 2014-05-01 21:21:46 -04:00