Skip to content

Commit c455cee

Browse files
authored
Merge branch 'master' into ssh_log_ip
2 parents 5eeb834 + 6bdcacd commit c455cee

File tree

1,718 files changed

+201069
-76220
lines changed

Some content is hidden

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

1,718 files changed

+201069
-76220
lines changed

.drone.yml

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ steps:
1818
- make node_modules
1919

2020
- name: lint-frontend
21-
pull: always
2221
image: node:14
2322
commands:
2423
- make lint-frontend
@@ -35,7 +34,6 @@ steps:
3534
TAGS: bindata sqlite sqlite_unlock_notify
3635

3736
- name: checks-frontend
38-
pull: always
3937
image: node:14
4038
commands:
4139
- make checks-frontend
@@ -49,7 +47,6 @@ steps:
4947
depends_on: [lint-backend]
5048

5149
- name: build-frontend
52-
pull: always
5350
image: node:14
5451
commands:
5552
- make frontend
@@ -66,7 +63,6 @@ steps:
6663
depends_on: [checks-backend]
6764

6865
- name: build-backend-arm64
69-
pull: always
7066
image: golang:1.15
7167
environment:
7268
GO111MODULE: on
@@ -80,7 +76,6 @@ steps:
8076
depends_on: [checks-backend]
8177

8278
- name: build-backend-386
83-
pull: always
8479
image: golang:1.15
8580
environment:
8681
GO111MODULE: on
@@ -108,33 +103,28 @@ workspace:
108103

109104
services:
110105
- name: mysql
111-
pull: default
112106
image: mysql:5.7
113107
environment:
114108
MYSQL_ALLOW_EMPTY_PASSWORD: yes
115109
MYSQL_DATABASE: test
116110

117111
- name: mysql8
118-
pull: default
119112
image: mysql:8.0
120113
environment:
121114
MYSQL_ALLOW_EMPTY_PASSWORD: yes
122115
MYSQL_DATABASE: testgitea
123116

124117
- name: mssql
125-
pull: default
126118
image: mcr.microsoft.com/mssql/server:latest
127119
environment:
128120
ACCEPT_EULA: Y
129121
MSSQL_PID: Standard
130122
SA_PASSWORD: MwantsaSecurePassword1
131123

132124
- name: ldap
133-
pull: default
134125
image: gitea/test-openldap:latest
135126

136127
- name: elasticsearch
137-
pull: default
138128
environment:
139129
discovery.type: single-node
140130
image: elasticsearch:7.5.0
@@ -149,7 +139,6 @@ services:
149139

150140
steps:
151141
- name: fetch-tags
152-
pull: default
153142
image: docker:git
154143
commands:
155144
- git fetch --tags --force
@@ -175,7 +164,6 @@ steps:
175164
- git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
176165

177166
- name: unit-test
178-
pull: always
179167
image: golang:1.15
180168
commands:
181169
- make unit-test-coverage test-check
@@ -186,7 +174,6 @@ steps:
186174
from_secret: github_read_token
187175

188176
- name: test-mysql
189-
pull: always
190177
image: golang:1.15
191178
commands:
192179
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -202,7 +189,6 @@ steps:
202189
- build
203190

204191
- name: test-mysql8
205-
pull: always
206192
image: golang:1.15
207193
commands:
208194
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -217,7 +203,6 @@ steps:
217203
- build
218204

219205
- name: test-mssql
220-
pull: always
221206
image: golang:1.15
222207
commands:
223208
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -232,7 +217,6 @@ steps:
232217
- build
233218

234219
- name: generate-coverage
235-
pull: always
236220
image: golang:1.15
237221
commands:
238222
- make coverage
@@ -295,7 +279,6 @@ services:
295279

296280
steps:
297281
- name: fetch-tags
298-
pull: default
299282
image: docker:git
300283
commands:
301284
- git fetch --tags --force
@@ -315,7 +298,6 @@ steps:
315298
TAGS: bindata sqlite sqlite_unlock_notify
316299

317300
- name: test-sqlite
318-
pull: always
319301
image: golang:1.15
320302
commands:
321303
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -329,7 +311,6 @@ steps:
329311
- build
330312

331313
- name: test-pgsql
332-
pull: always
333314
image: golang:1.15
334315
commands:
335316
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -431,7 +412,6 @@ depends_on:
431412

432413
steps:
433414
- name: fetch-tags
434-
pull: default
435415
image: docker:git
436416
commands:
437417
- git fetch --tags --force
@@ -485,7 +465,6 @@ steps:
485465
- push
486466

487467
- name: release-master
488-
pull: always
489468
image: plugins/s3:1
490469
settings:
491470
acl: public-read
@@ -644,7 +623,6 @@ trigger:
644623

645624
steps:
646625
- name: fetch-tags
647-
pull: default
648626
image: docker:git
649627
commands:
650628
- git fetch --tags --force
@@ -667,6 +645,27 @@ steps:
667645
exclude:
668646
- pull_request
669647

648+
- name: publish-rootless
649+
image: plugins/docker:linux-amd64
650+
settings:
651+
dockerfile: Dockerfile.rootless
652+
auto_tag: true
653+
auto_tag_suffix: linux-amd64-rootless
654+
repo: gitea/gitea
655+
build_args:
656+
- GOPROXY=off
657+
password:
658+
from_secret: docker_password
659+
username:
660+
from_secret: docker_username
661+
environment:
662+
PLUGIN_MIRROR:
663+
from_secret: plugin_mirror
664+
when:
665+
event:
666+
exclude:
667+
- pull_request
668+
670669
---
671670
kind: pipeline
672671
name: docker-linux-arm64-dry-run
@@ -696,6 +695,9 @@ steps:
696695
tags: linux-arm64
697696
build_args:
698697
- GOPROXY=off
698+
environment:
699+
PLUGIN_MIRROR:
700+
from_secret: plugin_mirror
699701
when:
700702
event:
701703
- pull_request
@@ -722,7 +724,6 @@ trigger:
722724
- "refs/tags/**"
723725
steps:
724726
- name: fetch-tags
725-
pull: default
726727
image: docker:git
727728
commands:
728729
- git fetch --tags --force
@@ -740,6 +741,30 @@ steps:
740741
from_secret: docker_password
741742
username:
742743
from_secret: docker_username
744+
environment:
745+
PLUGIN_MIRROR:
746+
from_secret: plugin_mirror
747+
when:
748+
event:
749+
exclude:
750+
- pull_request
751+
752+
- name: publish-rootless
753+
image: plugins/docker:linux-arm64
754+
settings:
755+
dockerfile: Dockerfile.rootless
756+
auto_tag: true
757+
auto_tag_suffix: linux-arm64-rootless
758+
repo: gitea/gitea
759+
build_args:
760+
- GOPROXY=off
761+
password:
762+
from_secret: docker_password
763+
username:
764+
from_secret: docker_username
765+
environment:
766+
PLUGIN_MIRROR:
767+
from_secret: plugin_mirror
743768
when:
744769
event:
745770
exclude:
@@ -754,8 +779,19 @@ platform:
754779
arch: amd64
755780

756781
steps:
757-
- name: manifest
782+
- name: manifest-rootless
758783
pull: always
784+
image: plugins/manifest
785+
settings:
786+
auto_tag: true
787+
ignore_missing: true
788+
spec: docker/manifest.rootless.tmpl
789+
password:
790+
from_secret: docker_password
791+
username:
792+
from_secret: docker_username
793+
794+
- name: manifest
759795
image: plugins/manifest
760796
settings:
761797
auto_tag: true

.eslintrc

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ reportUnusedDisableDirectives: true
33

44
ignorePatterns:
55
- /web_src/js/vendor
6+
- /templates/base/head.tmpl
7+
- /templates/repo/activity.tmpl
8+
- /templates/repo/view_file.tmpl
69

710
parserOptions:
811
sourceType: module
9-
ecmaVersion: 2020
12+
ecmaVersion: 2021
1013

1114
plugins:
1215
- eslint-plugin-unicorn
1316
- eslint-plugin-import
17+
- eslint-plugin-vue
18+
- eslint-plugin-html
19+
20+
extends:
21+
- plugin:vue/recommended
1422

1523
env:
1624
es2021: true
@@ -23,12 +31,19 @@ globals:
2331
SimpleMDE: false
2432
u2fApi: false
2533

34+
settings:
35+
html/html-extensions: [".tmpl"]
36+
2637
overrides:
27-
- files: ["web_src/**/*.js"]
38+
- files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
2839
env:
2940
browser: true
3041
jquery: true
3142
node: false
43+
- files: ["templates/**/*.tmpl"]
44+
rules:
45+
no-tabs: [0]
46+
indent: [2, tab, {SwitchCase: 1}]
3247
- files: ["web_src/**/*worker.js"]
3348
env:
3449
worker: true
@@ -99,7 +114,7 @@ rules:
99114
import/no-amd: [0]
100115
import/no-anonymous-default-export: [0]
101116
import/no-commonjs: [0]
102-
import/no-cycle: [0]
117+
import/no-cycle: [2, {ignoreExternal: true}]
103118
import/no-default-export: [0]
104119
import/no-deprecated: [0]
105120
import/no-dynamic-require: [0]
@@ -117,7 +132,7 @@ rules:
117132
import/no-self-import: [2]
118133
import/no-unassigned-import: [0]
119134
import/no-unresolved: [2, {commonjs: true}]
120-
import/no-unused-modules: [0]
135+
import/no-unused-modules: [2, {unusedExports: true}]
121136
import/no-useless-path-segments: [2, {commonjs: true}]
122137
import/no-webpack-loader-syntax: [2]
123138
import/order: [0]
@@ -211,7 +226,7 @@ rules:
211226
no-mixed-operators: [0]
212227
no-mixed-spaces-and-tabs: [2]
213228
no-multi-assign: [0]
214-
no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true, VariableDeclarator: true}}]
229+
no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
215230
no-multi-str: [2]
216231
no-negated-condition: [0]
217232
no-nested-ternary: [0]
@@ -220,6 +235,7 @@ rules:
220235
no-new-symbol: [2]
221236
no-new-wrappers: [2]
222237
no-new: [0]
238+
no-nonoctal-decimal-escape: [2]
223239
no-obj-calls: [2]
224240
no-octal-escape: [2]
225241
no-octal: [2]
@@ -336,6 +352,7 @@ rules:
336352
unicorn/explicit-length-check: [0]
337353
unicorn/filename-case: [0]
338354
unicorn/import-index: [0]
355+
unicorn/import-style: [0]
339356
unicorn/new-for-builtins: [2]
340357
unicorn/no-abusive-eslint-disable: [0]
341358
unicorn/no-array-instanceof: [0]
@@ -356,11 +373,13 @@ rules:
356373
unicorn/no-useless-undefined: [0]
357374
unicorn/no-zero-fractions: [2]
358375
unicorn/number-literal-case: [0]
376+
unicorn/numeric-separators-style: [0]
359377
unicorn/prefer-add-event-listener: [2]
360378
unicorn/prefer-array-find: [2]
361379
unicorn/prefer-dataset: [2]
362380
unicorn/prefer-event-key: [2]
363381
unicorn/prefer-includes: [2]
382+
unicorn/prefer-math-trunc: [2]
364383
unicorn/prefer-modern-dom-apis: [0]
365384
unicorn/prefer-negative-index: [2]
366385
unicorn/prefer-node-append: [0]
@@ -374,6 +393,7 @@ rules:
374393
unicorn/prefer-spread: [0]
375394
unicorn/prefer-starts-ends-with: [2]
376395
unicorn/prefer-string-slice: [0]
396+
unicorn/prefer-ternary: [0]
377397
unicorn/prefer-text-content: [2]
378398
unicorn/prefer-trim-start-end: [2]
379399
unicorn/prefer-type-error: [0]
@@ -383,6 +403,11 @@ rules:
383403
use-isnan: [2]
384404
valid-typeof: [2, {requireStringLiterals: true}]
385405
vars-on-top: [0]
406+
vue/attributes-order: [0]
407+
vue/component-definition-name-casing: [0]
408+
vue/html-closing-bracket-spacing: [0]
409+
vue/max-attributes-per-line: [0]
410+
vue/one-component-per-file: [0]
386411
wrap-iife: [2, inside]
387412
wrap-regex: [0]
388413
yield-star-spacing: [2, after]

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
* text=auto eol=lf
22
/vendor/** -text -eol linguist-vendored
33
/public/vendor/** -text -eol linguist-vendored
4+
/templates/**/*.tmpl linguist-language=Handlebars
5+
/.eslintrc linguist-language=YAML
6+
/.stylelintrc linguist-language=YAML

0 commit comments

Comments
 (0)