Skip to content

Commit 759f44e

Browse files
committed
Merge branch 'master' of git://github.com/go-gitea/gitea
2 parents e63bfd9 + ee11974 commit 759f44e

File tree

687 files changed

+26389
-17409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

687 files changed

+26389
-17409
lines changed

.golangci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ issues:
8686
- path: models/issue_comment_list.go
8787
linters:
8888
- dupl
89-
# "Destroy" is misspelled in github.com/go-macaron/session/session.go:213 so it's not our responsability to fix it
90-
- path: modules/session/virtual.go
91-
linters:
92-
- misspell
93-
text: '`Destory` is a misspelling of `Destroy`'
94-
- path: modules/session/memory.go
95-
linters:
96-
- misspell
97-
text: '`Destory` is a misspelling of `Destroy`'
9889
- linters:
9990
- misspell
10091
text: '`Unknwon` is a misspelling of `Unknown`'

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.9.2](https://github.com/go-gitea/gitea/releases/tag/v1.9.2) - 2019-08-22
8+
* BUGFIXES
9+
* Fix wrong sender when send slack webhook (#7918) (#7924)
10+
* Upload support text/plain; charset=utf8 (#7899)
11+
* Lfs/lock: round locked_at timestamp to second (#7872) (#7875)
12+
* Fix non existent milestone with 500 error (#7867) (#7873)
13+
* SECURITY
14+
* Fix No PGP signature on 1.9.1 tag (#7874)
15+
* Release built with go 1.12.9 to fix security fixes in golang std lib, ref: https://groups.google.com/forum/#!msg/golang-announce/oeMaeUnkvVE/a49yvTLqAAAJ
16+
* ENHANCEMENT
17+
* Fix pull creation with empty changes (#7920) (#7926)
18+
* BUILD
19+
* Drone/docker: prepare multi-arch release + provide arm64 image (#7571) (#7884)
20+
721
## [1.9.1](https://github.com/go-gitea/gitea/releases/tag/v1.9.1) - 2019-08-14
822
* BREAKING
923
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752)

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ endif
4343

4444
LDFLAGS := $(LDFLAGS) -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
4545

46-
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)))
46+
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))
4747
SOURCES ?= $(shell find . -name "*.go" -type f)
4848

4949
TMPDIR := ./build-tmp
@@ -102,7 +102,7 @@ generate:
102102
.PHONY: generate-swagger
103103
generate-swagger:
104104
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
105-
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.19.0; \
105+
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1; \
106106
fi
107107
swagger generate spec -o './$(SWAGGER_SPEC)'
108108
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
@@ -120,7 +120,7 @@ swagger-check: generate-swagger
120120
.PHONY: swagger-validate
121121
swagger-validate:
122122
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
123-
$(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
123+
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1; \
124124
fi
125125
$(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
126126
swagger validate './$(SWAGGER_SPEC)'

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func initDB() error {
3838

3939
func initDBDisableConsole(disableConsole bool) error {
4040
setting.NewContext()
41-
models.LoadConfigs()
41+
setting.InitDBConfig()
4242

4343
setting.NewXORMLogService(disableConsole)
4444
if err := models.SetEngine(); err != nil {

cmd/convert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func runConvert(ctx *cli.Context) error {
3131
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
3232
log.Trace("Custom path: %s", setting.CustomPath)
3333
log.Trace("Log path: %s", setting.LogRootPath)
34-
models.LoadConfigs()
34+
setting.InitDBConfig()
3535

36-
if models.DbCfg.Type != "mysql" {
36+
if !setting.Database.UseMySQL {
3737
fmt.Println("This command can only be used with a MySQL database")
3838
return nil
3939
}

cmd/dump.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"code.gitea.io/gitea/models"
1818
"code.gitea.io/gitea/modules/setting"
1919

20-
"github.com/Unknwon/cae/zip"
21-
"github.com/Unknwon/com"
20+
"github.com/unknwon/cae/zip"
21+
"github.com/unknwon/com"
2222
"github.com/urfave/cli"
2323
)
2424

@@ -62,7 +62,6 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
6262
func runDump(ctx *cli.Context) error {
6363
setting.NewContext()
6464
setting.NewServices() // cannot access session settings otherwise
65-
models.LoadConfigs()
6665

6766
err := models.SetEngine()
6867
if err != nil {
@@ -122,8 +121,8 @@ func runDump(ctx *cli.Context) error {
122121
}
123122

124123
targetDBType := ctx.String("database")
125-
if len(targetDBType) > 0 && targetDBType != models.DbCfg.Type {
126-
log.Printf("Dumping database %s => %s...", models.DbCfg.Type, targetDBType)
124+
if len(targetDBType) > 0 && targetDBType != setting.Database.Type {
125+
log.Printf("Dumping database %s => %s...", setting.Database.Type, targetDBType)
127126
} else {
128127
log.Printf("Dumping database...")
129128
}

cmd/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func runMigrate(ctx *cli.Context) error {
3030
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
3131
log.Trace("Custom path: %s", setting.CustomPath)
3232
log.Trace("Log path: %s", setting.LogRootPath)
33-
models.LoadConfigs()
33+
setting.InitDBConfig()
3434

3535
if err := models.NewEngine(migrations.Migrate); err != nil {
3636
log.Fatal("Failed to initialize ORM engine: %v", err)

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"code.gitea.io/gitea/modules/private"
2323
"code.gitea.io/gitea/modules/setting"
2424

25-
"github.com/Unknwon/com"
2625
"github.com/dgrijalva/jwt-go"
26+
"github.com/unknwon/com"
2727
"github.com/urfave/cli"
2828
)
2929

cmd/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"code.gitea.io/gitea/routers"
1919
"code.gitea.io/gitea/routers/routes"
2020

21-
"github.com/Unknwon/com"
2221
context2 "github.com/gorilla/context"
22+
"github.com/unknwon/com"
2323
"github.com/urfave/cli"
2424
"golang.org/x/crypto/acme/autocert"
2525
ini "gopkg.in/ini.v1"

contrib/pr/checkout.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import (
2727
"code.gitea.io/gitea/routers"
2828
"code.gitea.io/gitea/routers/routes"
2929

30-
"github.com/Unknwon/com"
3130
"github.com/go-xorm/xorm"
3231
context2 "github.com/gorilla/context"
32+
"github.com/unknwon/com"
3333
"gopkg.in/src-d/go-git.v4"
3434
"gopkg.in/src-d/go-git.v4/config"
3535
"gopkg.in/src-d/go-git.v4/plumbing"
@@ -79,16 +79,16 @@ func runPR() {
7979
setting.CheckLFSVersion()
8080
//models.LoadConfigs()
8181
/*
82-
models.DbCfg.Type = "sqlite3"
83-
models.DbCfg.Path = ":memory:"
84-
models.DbCfg.Timeout = 500
82+
setting.Database.Type = "sqlite3"
83+
setting.Database.Path = ":memory:"
84+
setting.Database.Timeout = 500
8585
*/
8686
db := setting.Cfg.Section("database")
8787
db.NewKey("DB_TYPE", "sqlite3")
8888
db.NewKey("PATH", ":memory:")
89-
setting.LogSQL = true
90-
models.LoadConfigs()
89+
9190
routers.NewServices()
91+
setting.Database.LogSQL = true
9292
//x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared")
9393

9494
var helper testfixtures.Helper = &testfixtures.SQLite{}

0 commit comments

Comments
 (0)