Commit graph

38 commits

Author SHA1 Message Date
guillep2k
bcb52aef09
Implement "embedded" command to extract static resources ()
* draft

* Implement extract command

* Fix nits and force args on extract

* Add !bindata stub, support Windows, fmt

* fix vendored flag

* Remove leading slash for matching

* Add docs

* Fix typos

* Add embedded view command

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-02-02 10:17:44 +08:00
zeripath
c01221e70f
Queue: Make WorkerPools and Queues flushable ()
* Make WorkerPools and Queues flushable

Adds Flush methods to Queues and the WorkerPool
Further abstracts the WorkerPool
Adds a final step to Flush the queues in the defer from PrintCurrentTest
Fixes an issue with Settings inheritance in queues

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Change to for loop

* Add IsEmpty and begin just making the queues composed WorkerPools

* subsume workerpool into the queues and create a flushable interface

* Add manager command

* Move flushall to queue.Manager and add to testlogger

* As per @guillep2k

* as per @guillep2k

* Just make queues all implement flushable and clean up the wrapped queue flushes

* cope with no timeout

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-28 20:01:06 -05:00
Antoine GIRARD
c6edb25fe2 chore: update default version ()
* chore: update default version

* use develop

Co-Authored-By: 6543 <6543@obermui.de>

* Update main.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-01-25 13:21:22 +00:00
Lunny Xiao
f69f5a9f10 Add a new command doctor to check if some wrong configurations on gitea instance ()
* add doctor

* Add a new command doctor to check if some wrong configurations on gitea instance

* fix import

* use regex match authorized_keys on doctor

* Add documentation
2020-01-11 15:24:57 +01:00
kolaente
f9ec2f89f2 Add golangci () 2019-06-12 15:41:28 -04:00
Lunny Xiao
23a2ee3510
Add command to convert mysql database from utf8 to utf8mb4 ()
* add command to convert mysql database from utf8 to utf8mb4

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
2019-06-08 21:53:45 +08:00
Lunny Xiao
83b90e4199 Use vfsgen instead of go-bindata ()
* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen
2019-06-03 00:43:47 +03:00
zeripath
e55c874dd2 Add work path CLI option ()
Makes it possible to set the work path as a CLI option instead of
relying on environment variables which are somewhat opaque
2019-05-14 11:20:35 -04:00
zeripath
8d0d7bc28d Make CustomPath, CustomConf and AppWorkPath configurable at build () 2019-04-29 14:08:21 -04:00
Lunny Xiao
0a8e63c682 add make version on gitea version () 2019-04-02 12:10:11 -04:00
zeripath
704da08fdc
Better logging () ()
* Panic don't fatal on create new logger

Fixes 

Signed-off-by: Andrew Thornton <art27@cantab.net>

* partial broken

* Update the logging infrastrcture

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Reset the skip levels for Fatal and Error

Signed-off-by: Andrew Thornton <art27@cantab.net>

* broken ncsa

* More log.Error fixes

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove nal

* set log-levels to lowercase

* Make console_test test all levels

* switch to lowercased levels

* OK now working

* Fix vetting issues

* Fix lint

* Fix tests

* change default logging to match current gitea

* Improve log testing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* reset error skip levels to 0

* Update documentation and access logger configuration

* Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE

* Fix broken level caching

* Refactor the router log

* Add Router logger

* Add colorizing options

* Adjust router colors

* Only create logger if they will be used

* update app.ini.sample

* rename Attribute ColorAttribute

* Change from white to green for function

* Set fatal/error levels

* Restore initial trace logger

* Fix Trace arguments in modules/auth/auth.go

* Properly handle XORMLogger

* Improve admin/config page

* fix fmt

* Add auto-compression of old logs

* Update error log levels

* Remove the unnecessary skip argument from Error, Fatal and Critical

* Add stacktrace support

* Fix tests

* Remove x/sync from vendors?

* Add stderr option to console logger

* Use filepath.ToSlash to protect against Windows in tests

* Remove prefixed underscores from names in colors.go

* Remove not implemented database logger

This was removed from Gogs on 4 Mar 2016 but left in the configuration
since then.

* Ensure that log paths are relative to ROOT_PATH

* use path.Join

* rename jsonConfig to logConfig

* Rename "config" to "jsonConfig" to make it clearer

* Requested changes

* Requested changes: XormLogger

* Try to color the windows terminal

If successful default to colorizing the console logs

* fixup

* Colorize initially too

* update vendor

* Colorize logs on default and remove if this is not a colorizing logger

* Fix documentation

* fix test

* Use go-isatty to detect if on windows we are on msys or cygwin

* Fix spelling mistake

* Add missing vendors

* More changes

* Rationalise the ANSI writer protection

* Adjust colors on advice from @0x5c

* Make Flags a comma separated list

* Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING

* Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 08:48:31 +01:00
Antoine GIRARD
d6c229cdbe Include Go toolchain to --version ()
* Include Go version

* fix import order
2019-01-24 10:22:51 -05:00
zeripath
7d9a191a3c Create AuthorizedKeysCommand () 2018-11-01 09:41:07 -04:00
Peter Hoffmann
584844eada fix: Accept web-command cli flags if web-command is commited ()
* fix: Accept web-command cli flags if web-command is commited

* Added flags of default cmd CmdWeb to app-wide flags
* If command *is* specified app-wide flags are ignored

Resolves: 
Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>

* Removed style breaking newline

* broken windows need to be fixed
* provides requested change
2018-10-31 20:36:41 -04:00
Robert Ștefan
7edb930240 Add command for migrating database () 2018-10-30 23:14:42 -04:00
Lunny Xiao
0bb1c84208 Add csv file render support defaultly ()
* add csv file render support defaultly

* escaping csv column content
2018-07-21 00:08:15 +03:00
Codruț Constantin Gușoi
96c268c0fc Implements generator cli for secrets ()
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
2018-02-18 20:14:37 +02:00
techknowlogick
77f8bad2fb Update hard-coded version to 1.5.0-dev ()
Now that 1.4.0 is out the new target is 1.5.0

(See  and  for more context if needed)
2018-02-03 17:03:43 +02:00
Morgan Bazalgette
88a3bb6d42 Make the default action for the gitea executable that of running the webserver () 2018-01-10 06:58:08 +02:00
techknowlogick
238bb80cdd Update hard-coded version to 1.4.0-dev ()
Now that 1.3.0 is out the new target is 1.4.0
2017-11-27 10:12:45 +08:00
Sandro Santilli
a4cd4616c6 Update hard-coded version to 1.3.0-dev ()
* Use -dev (1.3.0-dev is less than 1.3.0, according to semver)

* Use fake version for testing purpose
2017-10-12 14:40:42 +03:00
Lunny Xiao
0d80af649a Add init support of orgmode document type on file view and readme ()
* add init support of orgmode document type on file view and readme

* fix imports

* fix imports and readmeExist

* fix imports order

* fix format

* remove unnecessary convert
2017-09-21 13:20:14 +08:00
Jonas
a201977590 Fix for : Embed build tags ()
* Fix for 
Add build tags to ldflags and print in version output

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Reworked formatBuiltWith function

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Add tags to version information in admin panel

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Added new variable for use on admin page.

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Fixed incorrect indentation
2017-02-28 08:40:02 +08:00
Lunny Xiao
cd1821a7e2 Move push update to post-receive and protected branch check to pre-receive ()
* move all push update to git hook post-receive and protected branch check to git hook pre-receive

* add SSH_ORIGINAL_COMMAND check back

* remove all unused codes

* fix the import
2017-02-25 22:54:40 +08:00
Lunny Xiao
0e6b9ea786 Take back control of hooks ()
* git: delegate all server-side Git hooks ()

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

* fix migration scripts
2017-02-23 11:40:44 +08:00
Gabriel Jackson
bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
2017-02-02 15:24:18 +01:00
Bo-Yi Wu
467202d0a6 fix: Remove call to set GOMAXPROCS () 2017-01-04 21:16:03 +08:00
Thomas Boerger
f2ff0ee846 Raised version to 1.1.0 () 2016-12-24 02:19:12 +01:00
Joubert RedRat
ce21ed6c34 Remove remaining Gogs reference on locales and cmd () 2016-12-21 20:13:17 +08:00
Kim "BKC" Carlbäcker
1d1c01875d Autogenerate Version on build ()
* Autogenerate Version On Build

* Fixes

* Changed Version to v0.9.0

* balls

* I hate newlines

* Don't remove .VERSION-file on `make clean`

* v0.9.0 => 1.0.0

* damn new-lines...

* Always rebuild templates/.VERSION

* Delete .VERSION

* Update Makefile
2016-12-13 12:48:58 +08:00
Bwko
4ff0db0246 Catch os... errors 2016-12-02 07:41:19 +01:00
Lunny Xiao
bd76e156bb fixed bug finally () 2016-11-12 22:52:19 +08:00
Lunny Xiao
e2aa991e10 ask for go get from code.gitea.io/gitea and change gogs to gitea on main file () 2016-11-11 14:56:35 +01:00
Sandro Santilli
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Matthias Loibl
94b2747375 Remove go version from build tags () 2016-11-10 08:43:49 -02:00
Matthias Loibl
31da225309 Check unhandled errors () 2016-11-10 08:02:01 -02:00
Thomas Boerger
212a04a45e
Linter doesn't like uppercase variables 2016-11-04 23:45:06 +01:00
Matthias Loibl
a2514904cb Rename gogs.go to main.go
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2016-11-04 13:44:23 +01:00
Renamed from gogs.go (Browse further)