Skip to content

Commit 1a8e34a

Browse files
committed
Merge remote-tracking branch 'main/release/v1.16' into codeberg-1.16
2 parents 91eb05a + 8d653b1 commit 1a8e34a

File tree

3 files changed

+48
-44
lines changed

3 files changed

+48
-44
lines changed

.drone.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ steps:
4545
commands:
4646
- make lint-backend
4747
environment:
48-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
48+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
4949
GOSUMDB: sum.golang.org
5050
TAGS: bindata sqlite sqlite_unlock_notify
5151
depends_on: [deps-backend]
@@ -58,7 +58,7 @@ steps:
5858
commands:
5959
- make golangci-lint-windows vet
6060
environment:
61-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
61+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
6262
GOSUMDB: sum.golang.org
6363
TAGS: bindata sqlite sqlite_unlock_notify
6464
GOOS: windows
@@ -73,7 +73,7 @@ steps:
7373
commands:
7474
- make lint-backend
7575
environment:
76-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
76+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
7777
GOSUMDB: sum.golang.org
7878
TAGS: bindata gogit sqlite sqlite_unlock_notify
7979
depends_on: [deps-backend]
@@ -113,7 +113,7 @@ steps:
113113
pull: always
114114
environment:
115115
GO111MODULE: on
116-
GOPROXY: https://goproxy.cn
116+
GOPROXY: https://goproxy.io
117117
commands:
118118
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
119119
depends_on: [deps-backend, checks-backend]
@@ -125,7 +125,7 @@ steps:
125125
image: golang:1.18
126126
environment:
127127
GO111MODULE: on
128-
GOPROXY: https://goproxy.cn
128+
GOPROXY: https://goproxy.io
129129
GOOS: linux
130130
GOARCH: arm64
131131
TAGS: bindata gogit
@@ -141,7 +141,7 @@ steps:
141141
image: golang:1.18
142142
environment:
143143
GO111MODULE: on
144-
GOPROXY: https://goproxy.cn
144+
GOPROXY: https://goproxy.io
145145
GOOS: windows
146146
GOARCH: amd64
147147
TAGS: bindata gogit
@@ -156,7 +156,7 @@ steps:
156156
image: golang:1.18
157157
environment:
158158
GO111MODULE: on
159-
GOPROXY: https://goproxy.cn
159+
GOPROXY: https://goproxy.io
160160
GOOS: linux
161161
GOARCH: 386
162162
commands:
@@ -269,7 +269,7 @@ steps:
269269
- ./build/test-env-check.sh
270270
- make backend
271271
environment:
272-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
272+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
273273
GOSUMDB: sum.golang.org
274274
TAGS: bindata sqlite sqlite_unlock_notify
275275
depends_on: [deps-backend, prepare-test-env]
@@ -283,7 +283,7 @@ steps:
283283
commands:
284284
- make unit-test-coverage test-check
285285
environment:
286-
GOPROXY: https://goproxy.cn
286+
GOPROXY: https://goproxy.io
287287
TAGS: bindata sqlite sqlite_unlock_notify
288288
RACE_ENABLED: true
289289
GITHUB_READ_TOKEN:
@@ -299,7 +299,7 @@ steps:
299299
commands:
300300
- make unit-test-coverage test-check
301301
environment:
302-
GOPROXY: https://goproxy.cn
302+
GOPROXY: https://goproxy.io
303303
TAGS: bindata gogit sqlite sqlite_unlock_notify
304304
RACE_ENABLED: true
305305
GITHUB_READ_TOKEN:
@@ -315,7 +315,7 @@ steps:
315315
commands:
316316
- make test-mysql-migration integration-test-coverage
317317
environment:
318-
GOPROXY: https://goproxy.cn
318+
GOPROXY: https://goproxy.io
319319
TAGS: bindata
320320
RACE_ENABLED: true
321321
TEST_LDAP: 1
@@ -332,7 +332,7 @@ steps:
332332
commands:
333333
- timeout -s ABRT 40m make test-mysql8-migration test-mysql8
334334
environment:
335-
GOPROXY: https://goproxy.cn
335+
GOPROXY: https://goproxy.io
336336
TAGS: bindata
337337
RACE_ENABLED: true
338338
TEST_LDAP: 1
@@ -348,7 +348,7 @@ steps:
348348
commands:
349349
- make test-mssql-migration test-mssql
350350
environment:
351-
GOPROXY: https://goproxy.cn
351+
GOPROXY: https://goproxy.io
352352
TAGS: bindata
353353
RACE_ENABLED: true
354354
TEST_LDAP: 1
@@ -363,7 +363,7 @@ steps:
363363
commands:
364364
- make coverage
365365
environment:
366-
GOPROXY: https://goproxy.cn
366+
GOPROXY: https://goproxy.io
367367
TAGS: bindata
368368
depends_on: [unit-test, test-mysql]
369369
when:
@@ -455,7 +455,7 @@ steps:
455455
- ./build/test-env-check.sh
456456
- make backend
457457
environment:
458-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
458+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
459459
GOSUMDB: sum.golang.org
460460
TAGS: bindata gogit sqlite sqlite_unlock_notify
461461
depends_on: [deps-backend, prepare-test-env]
@@ -469,7 +469,7 @@ steps:
469469
commands:
470470
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
471471
environment:
472-
GOPROXY: https://goproxy.cn
472+
GOPROXY: https://goproxy.io
473473
TAGS: bindata gogit sqlite sqlite_unlock_notify
474474
RACE_ENABLED: true
475475
TEST_TAGS: gogit sqlite sqlite_unlock_notify
@@ -485,7 +485,7 @@ steps:
485485
commands:
486486
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
487487
environment:
488-
GOPROXY: https://goproxy.cn
488+
GOPROXY: https://goproxy.io
489489
TAGS: bindata gogit
490490
RACE_ENABLED: true
491491
TEST_TAGS: gogit
@@ -653,7 +653,7 @@ steps:
653653
- export PATH=$PATH:$GOPATH/bin
654654
- make release
655655
environment:
656-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
656+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
657657
TAGS: bindata sqlite sqlite_unlock_notify
658658
volumes:
659659
- name: deps
@@ -771,7 +771,7 @@ steps:
771771
- export PATH=$PATH:$GOPATH/bin
772772
- make release
773773
environment:
774-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
774+
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
775775
TAGS: bindata sqlite sqlite_unlock_notify
776776
depends_on: [fetch-tags]
777777
volumes:
@@ -901,7 +901,7 @@ steps:
901901
auto_tag_suffix: linux-amd64
902902
repo: gitea/gitea
903903
build_args:
904-
- GOPROXY=https://goproxy.cn
904+
- GOPROXY=https://goproxy.io
905905
password:
906906
from_secret: docker_password
907907
username:
@@ -919,7 +919,7 @@ steps:
919919
auto_tag_suffix: linux-amd64-rootless
920920
repo: gitea/gitea
921921
build_args:
922-
- GOPROXY=https://goproxy.cn
922+
- GOPROXY=https://goproxy.io
923923
password:
924924
from_secret: docker_password
925925
username:
@@ -964,7 +964,7 @@ steps:
964964
tags: dev-linux-amd64
965965
repo: gitea/gitea
966966
build_args:
967-
- GOPROXY=https://goproxy.cn
967+
- GOPROXY=https://goproxy.io
968968
password:
969969
from_secret: docker_password
970970
username:
@@ -982,7 +982,7 @@ steps:
982982
tags: dev-linux-amd64-rootless
983983
repo: gitea/gitea
984984
build_args:
985-
- GOPROXY=https://goproxy.cn
985+
- GOPROXY=https://goproxy.io
986986
password:
987987
from_secret: docker_password
988988
username:
@@ -1026,7 +1026,7 @@ steps:
10261026
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
10271027
repo: gitea/gitea
10281028
build_args:
1029-
- GOPROXY=https://goproxy.cn
1029+
- GOPROXY=https://goproxy.io
10301030
password:
10311031
from_secret: docker_password
10321032
username:
@@ -1044,7 +1044,7 @@ steps:
10441044
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
10451045
repo: gitea/gitea
10461046
build_args:
1047-
- GOPROXY=https://goproxy.cn
1047+
- GOPROXY=https://goproxy.io
10481048
password:
10491049
from_secret: docker_password
10501050
username:
@@ -1079,7 +1079,7 @@ steps:
10791079
repo: gitea/gitea
10801080
tags: linux-arm64
10811081
build_args:
1082-
- GOPROXY=https://goproxy.cn
1082+
- GOPROXY=https://goproxy.io
10831083
environment:
10841084
PLUGIN_MIRROR:
10851085
from_secret: plugin_mirror
@@ -1122,7 +1122,7 @@ steps:
11221122
auto_tag_suffix: linux-arm64
11231123
repo: gitea/gitea
11241124
build_args:
1125-
- GOPROXY=https://goproxy.cn
1125+
- GOPROXY=https://goproxy.io
11261126
password:
11271127
from_secret: docker_password
11281128
username:
@@ -1140,7 +1140,7 @@ steps:
11401140
auto_tag_suffix: linux-arm64-rootless
11411141
repo: gitea/gitea
11421142
build_args:
1143-
- GOPROXY=https://goproxy.cn
1143+
- GOPROXY=https://goproxy.io
11441144
password:
11451145
from_secret: docker_password
11461146
username:
@@ -1185,7 +1185,7 @@ steps:
11851185
tags: dev-linux-arm64
11861186
repo: gitea/gitea
11871187
build_args:
1188-
- GOPROXY=https://goproxy.cn
1188+
- GOPROXY=https://goproxy.io
11891189
password:
11901190
from_secret: docker_password
11911191
username:
@@ -1203,7 +1203,7 @@ steps:
12031203
tags: dev-linux-arm64-rootless
12041204
repo: gitea/gitea
12051205
build_args:
1206-
- GOPROXY=https://goproxy.cn
1206+
- GOPROXY=https://goproxy.io
12071207
password:
12081208
from_secret: docker_password
12091209
username:
@@ -1247,7 +1247,7 @@ steps:
12471247
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
12481248
repo: gitea/gitea
12491249
build_args:
1250-
- GOPROXY=https://goproxy.cn
1250+
- GOPROXY=https://goproxy.io
12511251
password:
12521252
from_secret: docker_password
12531253
username:
@@ -1265,7 +1265,7 @@ steps:
12651265
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
12661266
repo: gitea/gitea
12671267
build_args:
1268-
- GOPROXY=https://goproxy.cn
1268+
- GOPROXY=https://goproxy.io
12691269
password:
12701270
from_secret: docker_password
12711271
username:

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
2525
COMMA := ,
2626

2727
XGO_VERSION := go-1.18.x
28-
MIN_GO_VERSION := 001017000
29-
MIN_NODE_VERSION := 012017000
3028

3129
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.29.0
3230
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.4.0
@@ -203,9 +201,11 @@ help:
203201

204202
.PHONY: go-check
205203
go-check:
204+
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
205+
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
206206
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
207207
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
208-
echo "Gitea requires Go 1.16 or greater to build. You can get it at https://golang.org/dl/"; \
208+
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
209209
exit 1; \
210210
fi
211211

@@ -218,11 +218,12 @@ git-check:
218218

219219
.PHONY: node-check
220220
node-check:
221+
$(eval MIN_NODE_VERSION_STR := $(shell grep -Eo '"node":.*[0-9.]+"' package.json | sed -n 's/.*[^0-9.]\([0-9.]*\)"/\1/p'))
222+
$(eval MIN_NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell echo '$(MIN_NODE_VERSION_STR)' | tr '.' ' ')))
221223
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
222-
$(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...)))
223224
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
224225
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
225-
echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
226+
echo "Gitea requires Node.js $(MIN_NODE_VERSION_STR) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
226227
exit 1; \
227228
fi
228229

templates/repo/empty.tmpl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,17 @@ git push -u origin {{.Repository.DefaultBranch}}</code></pre>
5050
git push -u origin {{.Repository.DefaultBranch}}</code></pre>
5151
</div>
5252
</div>
53-
<script defer>
54-
/* eslint-disable no-undef */
55-
const cloneUrls = document.getElementsByClassName('clone-url');
56-
if (cloneUrls) {
57-
for (let i = 0; i < cloneUrls.length; i++) {
58-
cloneUrls[i].textContent = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
53+
<script>
54+
(() => {
55+
const proto = localStorage.getItem('repo-clone-protocol') || 'https';
56+
const btn = document.getElementById(`repo-clone-${proto}`) || document.getElementById(`repo-clone-https`) || document.getElementById(`repo-clone-ssh`);
57+
if (btn) {
58+
const cloneUrls = document.getElementsByClassName('clone-url');
59+
for (let i = 0; i < cloneUrls.length; i++) {
60+
cloneUrls[i].textContent = btn.getAttribute('data-link');
61+
}
5962
}
60-
}
63+
})();
6164
</script>
6265
{{end}}
6366
{{else}}

0 commit comments

Comments
 (0)