Commit graph

30 commits

Author SHA1 Message Date
zeripath
8d0d7bc28d Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 2019-04-29 14:08:21 -04:00
Lunny Xiao
0a8e63c682 add make version on gitea version (#6485) 2019-04-02 12:10:11 -04:00
zeripath
704da08fdc
Better logging (#6038) (#6095)
* Panic don't fatal on create new logger

Fixes #5854

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 (#5830)
* Include Go version

* fix import order
2019-01-24 10:22:51 -05:00
zeripath
7d9a191a3c Create AuthorizedKeysCommand (#5236) 2018-11-01 09:41:07 -04:00
Peter Hoffmann
584844eada fix: Accept web-command cli flags if web-command is commited (#5200)
* 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: #5065
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 (#4954) 2018-10-30 23:14:42 -04:00
Lunny Xiao
0bb1c84208 Add csv file render support defaultly (#4105)
* 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 (#3531)
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 (#3450)
Now that 1.4.0 is out the new target is 1.5.0

(See #2390 and #2988 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 (#3331) 2018-01-10 06:58:08 +02:00
techknowlogick
238bb80cdd Update hard-coded version to 1.4.0-dev (#2988)
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 (#2390)
* 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 (#2525)
* 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 #828: Embed build tags (#1051)
* Fix for #828
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 (#1030)
* 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 (#1006)
* git: delegate all server-side Git hooks (#1623)

* 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 (#577) 2017-01-04 21:16:03 +08:00
Thomas Boerger
f2ff0ee846 Raised version to 1.1.0 (#468) 2016-12-24 02:19:12 +01:00
Joubert RedRat
ce21ed6c34 Remove remaining Gogs reference on locales and cmd (#430) 2016-12-21 20:13:17 +08:00
Kim "BKC" Carlbäcker
1d1c01875d Autogenerate Version on build (#190)
* 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 #151 finally (#164) 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 (#146) 2016-11-11 14:56:35 +01:00
Sandro Santilli
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- 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 (#133) 2016-11-10 08:43:49 -02:00
Matthias Loibl
31da225309 Check unhandled errors (#128) 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)