Skip to content

Commit 10043ac

Browse files
committed
Merge branch 'master' of https://github.com/go-gitea/gitea
2 parents 82973ae + 0d93430 commit 10043ac

File tree

184 files changed

+6580
-2823
lines changed

Some content is hidden

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

184 files changed

+6580
-2823
lines changed

Makefile

Lines changed: 87 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -204,94 +204,140 @@ test-sqlite\#%: integrations.sqlite.test
204204
test-sqlite-migration: migrations.sqlite.test
205205
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test
206206

207-
generate-ini:
207+
generate-ini-mysql:
208208
sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
209209
-e 's|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
210210
-e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
211211
-e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
212212
integrations/mysql.ini.tmpl > integrations/mysql.ini
213+
214+
.PHONY: test-mysql
215+
test-mysql: integrations.mysql.test generate-ini-mysql
216+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test
217+
218+
.PHONY: test-mysql\#%
219+
test-mysql\#%: integrations.mysql.test generate-ini-mysql
220+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $*
221+
222+
.PHONY: test-mysql-migration
223+
test-mysql-migration: migrations.mysql.test generate-ini-mysql
224+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test
225+
226+
227+
generate-ini-mysql8:
213228
sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
214229
-e 's|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
215230
-e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
216231
-e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
217232
integrations/mysql8.ini.tmpl > integrations/mysql8.ini
233+
234+
.PHONY: test-mysql8
235+
test-mysql8: integrations.mysql8.test generate-ini-mysql8
236+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test
237+
238+
.PHONY: test-mysql8\#%
239+
test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
240+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $*
241+
242+
.PHONY: test-mysql8-migration
243+
test-mysql8-migration: migrations.mysql8.test generate-ini-mysql8
244+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test
245+
246+
247+
generate-ini-pgsql:
218248
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
219249
-e 's|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
220250
-e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
221251
-e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
222252
integrations/pgsql.ini.tmpl > integrations/pgsql.ini
223-
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
224-
-e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
225-
-e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
226-
-e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
227-
integrations/mssql.ini.tmpl > integrations/mssql.ini
228-
229-
.PHONY: test-mysql
230-
test-mysql: integrations.test generate-ini
231-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test
232253

233-
.PHONY: test-mysql-migration
234-
test-mysql-migration: migrations.test generate-ini
235-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./migrations.test
254+
.PHONY: test-pgsql
255+
test-pgsql: integrations.pgsql.test generate-ini-pgsql
256+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test
236257

237-
.PHONY: test-mysql8
238-
test-mysql8: integrations.test generate-ini
239-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.test
258+
.PHONY: test-pgsql\#%
259+
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
260+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $*
240261

241-
.PHONY: test-mysql8-migration
242-
test-mysql8-migration: migrations.test generate-ini
243-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./migrations.test
262+
.PHONY: test-pgsql-migration
263+
test-pgsql-migration: migrations.pgsql.test generate-ini-pgsql
264+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./migrations.pgsql.test
244265

245-
.PHONY: test-pgsql
246-
test-pgsql: integrations.test generate-ini
247-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test
248266

249-
.PHONY: test-pgsql-migration
250-
test-pgsql-migration: migrations.test generate-ini
251-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./migrations.test
267+
generate-ini-mssql:
268+
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
269+
-e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
270+
-e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
271+
-e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
272+
integrations/mssql.ini.tmpl > integrations/mssql.ini
252273

253274
.PHONY: test-mssql
254-
test-mssql: integrations.test generate-ini
255-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test
275+
test-mssql: integrations.mssql.test generate-ini-mssql
276+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test
277+
278+
.PHONY: test-mssql\#%
279+
test-mssql\#%: integrations.mssql.test generate-ini-mssql
280+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $*
256281

257282
.PHONY: test-mssql-migration
258-
test-mssql-migration: migrations.test generate-ini
259-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./migrations.test
283+
test-mssql-migration: migrations.mssql.test generate-ini-mssql
284+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./migrations.mssql.test
260285

261286

262287
.PHONY: bench-sqlite
263288
bench-sqlite: integrations.sqlite.test
264289
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
265290

266291
.PHONY: bench-mysql
267-
bench-mysql: integrations.test generate-ini
268-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
292+
bench-mysql: integrations.mysql.test generate-ini-mysql
293+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
269294

270295
.PHONY: bench-mssql
271-
bench-mssql: integrations.test generate-ini
272-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
296+
bench-mssql: integrations.mssql.test generate-ini-mssql
297+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
273298

274299
.PHONY: bench-pgsql
275-
bench-pgsql: integrations.test generate-ini
276-
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
300+
bench-pgsql: integrations.pgsql.test generate-ini-pgsql
301+
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
277302

278303

279304
.PHONY: integration-test-coverage
280-
integration-test-coverage: integrations.cover.test generate-ini
305+
integration-test-coverage: integrations.cover.test generate-ini-mysql
281306
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
282307

283-
integrations.test: $(SOURCES)
284-
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.test
308+
integrations.mysql.test: $(SOURCES)
309+
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test
310+
311+
integrations.mysql8.test: $(SOURCES)
312+
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
313+
314+
integrations.pgsql.test: $(SOURCES)
315+
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
316+
317+
integrations.mssql.test: $(SOURCES)
318+
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test
285319

286320
integrations.sqlite.test: $(SOURCES)
287321
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
288322

289323
integrations.cover.test: $(SOURCES)
290324
GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test
291325

292-
.PHONY: migrations.test
293-
migrations.test: $(SOURCES)
294-
$(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.test
326+
.PHONY: migrations.mysql.test
327+
migrations.mysql.test: $(SOURCES)
328+
$(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test
329+
330+
.PHONY: migrations.mysql8.test
331+
migrations.mysql8.test: $(SOURCES)
332+
$(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql8.test
333+
334+
.PHONY: migrations.pgsql.test
335+
migrations.pgsql.test: $(SOURCES)
336+
$(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.pgsql.test
337+
338+
.PHONY: migrations.mssql.test
339+
migrations.mssql.test: $(SOURCES)
340+
$(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mssql.test
295341

296342
.PHONY: migrations.sqlite.test
297343
migrations.sqlite.test: $(SOURCES)

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
292292
- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory cache only.
293293
- `HOST`: **\<empty\>**: Connection string for `redis` and `memcache`.
294294
- Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180`
295-
- Memache: `127.0.0.1:9090;127.0.0.1:9091`
295+
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
296296
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
297297

298298
## Session (`session`)
@@ -522,4 +522,4 @@ Two special environment variables are passed to the render command:
522522

523523
- `SHOW_FOOTER_BRANDING`: **false**: Show Gitea branding in the footer.
524524
- `SHOW_FOOTER_VERSION`: **true**: Show Gitea version information in the footer.
525-
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
525+
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.

docs/content/doc/advanced/external-renderers.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ In order to get file rendering through external binaries, their associated packa
2828
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
2929

3030
```
31-
FROM gitea/gitea:1.6.0
31+
FROM gitea/gitea:{{< version >}}
3232
[...]
3333
3434
COPY custom/app.ini /data/gitea/conf/app.ini
3535
[...]
3636
37-
RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng python-dev py-pip python3-dev py3-pip
37+
RUN apk --no-cache add asciidoctor freetype freetype-dev gcc g++ libpng python-dev py-pip python3-dev py3-pip py3-zmq
3838
# install any other package you need for your external renderers
3939
4040
RUN pip3 install --upgrade pip

docs/content/doc/advanced/hacking-on-gitea.en-us.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ and look at our
108108
[`.drone.yml`](https://github.com/go-gitea/gitea/blob/master/.drone.yml) to see
109109
how our continuous integration works.
110110

111-
### Formatting, linting, vetting and spell-check
111+
### Formatting, code analysis and spell check
112112

113113
Our continous integration will reject PRs that are not properly formatted, fail
114-
linting, vet or spell-check.
114+
code analysis or spell check.
115115

116116
You should format your code with `go fmt` using:
117117

@@ -130,10 +130,10 @@ You should run the same version of go that is on the continuous integration
130130
server as mentioned above. `make fmt-check` will only check if your `go` would
131131
format differently - this may be different from the CI server version.
132132

133-
You should lint, vet and spell-check with:
133+
You should run revive, vet and spell-check on the code with:
134134

135135
```bash
136-
make vet lint misspell-check
136+
make revive vet misspell-check
137137
```
138138

139139
### Updating CSS
@@ -178,7 +178,7 @@ make generate-swagger
178178
You should validate your generated Swagger file and spell-check it with:
179179

180180
```bash
181-
make swagger-validate mispell-check
181+
make swagger-validate misspell-check
182182
```
183183

184184
You should commit the changed swagger JSON file. The continous integration

go.mod

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require (
2727
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d // indirect
2828
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
2929
github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 // indirect
30-
github.com/denisenkom/go-mssqldb v0.0.0-20190820223206-44cdfe8d8ba9
30+
github.com/denisenkom/go-mssqldb v0.0.0-20190924004331-208c0a498538
3131
github.com/dgrijalva/jwt-go v3.2.0+incompatible
3232
github.com/emirpasic/gods v1.12.0
3333
github.com/etcd-io/bbolt v1.3.2 // indirect
@@ -48,7 +48,7 @@ require (
4848
github.com/go-redis/redis v6.15.2+incompatible
4949
github.com/go-sql-driver/mysql v1.4.1
5050
github.com/go-swagger/go-swagger v0.20.1
51-
github.com/go-xorm/xorm v0.7.7-0.20190822154023-17592d96b35b
51+
github.com/go-xorm/xorm v0.7.8
5252
github.com/gobwas/glob v0.2.3
5353
github.com/gogits/chardet v0.0.0-20150115103509-2404f7772561
5454
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
@@ -64,7 +64,7 @@ require (
6464
github.com/klauspost/compress v0.0.0-20161025140425-8df558b6cb6f
6565
github.com/klauspost/cpuid v0.0.0-20160302075316-09cded8978dc // indirect
6666
github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 // indirect
67-
github.com/lafriks/xormstore v1.2.0
67+
github.com/lafriks/xormstore v1.3.0
6868
github.com/lib/pq v1.2.0
6969
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
7070
github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e
@@ -104,16 +104,14 @@ require (
104104
github.com/urfave/cli v1.20.0
105105
github.com/willf/bitset v0.0.0-20180426185212-8ce1146b8621 // indirect
106106
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
107-
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472
107+
golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad
108108
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b
109109
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
110110
golang.org/x/sys v0.0.0-20190910064555-bbd175535a8b
111111
golang.org/x/text v0.3.2
112112
golang.org/x/tools v0.0.0-20190910221609-7f5965fd7709 // indirect
113-
google.golang.org/appengine v1.6.2 // indirect
114113
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
115114
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
116-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
117115
gopkg.in/editorconfig/editorconfig-core-go.v1 v1.3.0
118116
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
119117
gopkg.in/ini.v1 v1.46.0
@@ -124,6 +122,6 @@ require (
124122
gopkg.in/testfixtures.v2 v2.5.0
125123
mvdan.cc/xurls/v2 v2.0.0
126124
strk.kbt.io/projects/go/libravatar v0.0.0-20160628055650-5eed7bff870a
127-
xorm.io/builder v0.3.5
128-
xorm.io/core v0.7.0
125+
xorm.io/builder v0.3.6
126+
xorm.io/core v0.7.2
129127
)

0 commit comments

Comments
 (0)