Skip to content

Commit f3d994d

Browse files
authored
Merge branch 'main' into azure-blob-storage-support
2 parents efc0ed7 + c0fc53e commit f3d994d

File tree

196 files changed

+2388
-1245
lines changed

Some content is hidden

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

196 files changed

+2388
-1245
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
77
"version":"20"
8-
}
8+
},
9+
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
10+
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
11+
"ghcr.io/devcontainers/features/python:1": {}
912
},
1013
"customizations": {
1114
"vscode": {
@@ -20,7 +23,7 @@
2023
"Vue.volar",
2124
"ms-azuretools.vscode-docker",
2225
"zixuanchen.vitest-explorer",
23-
"alexcvzz.vscode-sqlite",
26+
"qwtel.sqlite-viewer",
2427
"Azurite.azurite"
2528
]
2629
}

.github/workflows/pull-compliance.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
- run: make deps-frontend
9797
- run: make lint-frontend
9898
- run: make checks-frontend
99+
- run: make test-frontend
99100
- run: make frontend
100101

101102
backend:
@@ -110,7 +111,7 @@ jobs:
110111
check-latest: true
111112
# no frontend build here as backend should be able to build
112113
# even without any frontend files
113-
- run: make deps-backend deps-tools
114+
- run: make deps-backend
114115
- run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
115116
- name: build-backend-arm64
116117
run: make backend # test cross compile

.github/workflows/release-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ jobs:
7878
- name: build rootful docker image
7979
uses: docker/build-push-action@v4
8080
with:
81+
context: .
8182
platforms: linux/amd64,linux/arm64
8283
push: true
8384
tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}
8485
- name: build rootless docker image
8586
uses: docker/build-push-action@v4
8687
with:
88+
context: .
8789
platforms: linux/amd64,linux/arm64
8890
push: true
8991
file: Dockerfile.rootless

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ cpu.out
5353
/bin
5454
/dist
5555
/custom/*
56-
!/custom/conf
57-
/custom/conf/*
5856
!/custom/conf/app.example.ini
5957
/data
6058
/indexers

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ vscode:
3434
- Vue.volar
3535
- ms-azuretools.vscode-docker
3636
- zixuanchen.vitest-explorer
37-
- alexcvzz.vscode-sqlite
37+
- qwtel.sqlite-viewer
3838

3939
ports:
4040
- name: Gitea

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ be reviewed by two maintainers and must pass the automatic tests.
557557
- And then push the tag as `git push origin v$vmaj.$vmin.$`. Drone CI will automatically create a release and upload all the compiled binary. (But currently it doesn't add the release notes automatically. Maybe we should fix that.)
558558
- If needed send a frontport PR for the changelog to branch `main` and update the version in `docs/config.yaml` to refer to the new version.
559559
- Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
560-
- Verify all release assets were correctly published through CI on dl.gitea.io and GitHub releases. Once ACKed:
561-
- bump the version of https://dl.gitea.io/gitea/version.json
560+
- Verify all release assets were correctly published through CI on dl.gitea.com and GitHub releases. Once ACKed:
561+
- bump the version of https://dl.gitea.com/gitea/version.json
562562
- merge the blog post PR
563563
- announce the release in discord `#announcements`

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ endif
7979
STORED_VERSION_FILE := VERSION
8080
HUGO_VERSION ?= 0.111.3
8181

82+
GITHUB_REF_TYPE ?= branch
83+
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
84+
8285
ifneq ($(GITHUB_REF_TYPE),branch)
8386
VERSION ?= $(subst v,,$(GITHUB_REF_NAME))
8487
GITEA_VERSION ?= $(GITHUB_REF_NAME)
@@ -1011,9 +1014,5 @@ docker:
10111014
docker build --disable-content-trust=false -t $(DOCKER_REF) .
10121015
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
10131016

1014-
.PHONY: docker-build
1015-
docker-build:
1016-
docker run -ti --rm -v "$(CURDIR):/srv/app/src/code.gitea.io/gitea" -w /srv/app/src/code.gitea.io/gitea -e TAGS="bindata $(TAGS)" LDFLAGS="$(LDFLAGS)" CGO_EXTRA_CFLAGS="$(CGO_EXTRA_CFLAGS)" webhippie/golang:edge make clean build
1017-
10181017
# This endif closes the if at the top of the file
10191018
endif

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ for the full license text.
173173

174174
Looking for an overview of the interface? Check it out!
175175

176-
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
176+
|![Dashboard](https://dl.gitea.com/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.com/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.com/screenshots/global_issues.png)|
177177
|:---:|:---:|:---:|
178-
|![Branches](https://dl.gitea.io/screenshots/branches.png)|![Web Editor](https://dl.gitea.io/screenshots/web_editor.png)|![Activity](https://dl.gitea.io/screenshots/activity.png)|
179-
|![New Migration](https://dl.gitea.io/screenshots/migration.png)|![Migrating](https://dl.gitea.io/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
180-
![Pull Request Dark](https://dl.gitea.io/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.io/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.io/screenshots/diff_dark.png)|
178+
|![Branches](https://dl.gitea.com/screenshots/branches.png)|![Web Editor](https://dl.gitea.com/screenshots/web_editor.png)|![Activity](https://dl.gitea.com/screenshots/activity.png)|
179+
|![New Migration](https://dl.gitea.com/screenshots/migration.png)|![Migrating](https://dl.gitea.com/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
180+
![Pull Request Dark](https://dl.gitea.com/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.com/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.com/screenshots/diff_dark.png)|

README_ZH.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Fork -> Patch -> Push -> Pull Request
9191

9292
## 截图
9393

94-
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
94+
|![Dashboard](https://dl.gitea.com/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.com/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.com/screenshots/global_issues.png)|
9595
|:---:|:---:|:---:|
96-
|![Branches](https://dl.gitea.io/screenshots/branches.png)|![Web Editor](https://dl.gitea.io/screenshots/web_editor.png)|![Activity](https://dl.gitea.io/screenshots/activity.png)|
97-
|![New Migration](https://dl.gitea.io/screenshots/migration.png)|![Migrating](https://dl.gitea.io/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
98-
![Pull Request Dark](https://dl.gitea.io/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.io/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.io/screenshots/diff_dark.png)|
96+
|![Branches](https://dl.gitea.com/screenshots/branches.png)|![Web Editor](https://dl.gitea.com/screenshots/web_editor.png)|![Activity](https://dl.gitea.com/screenshots/activity.png)|
97+
|![New Migration](https://dl.gitea.com/screenshots/migration.png)|![Migrating](https://dl.gitea.com/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
98+
![Pull Request Dark](https://dl.gitea.com/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.com/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.com/screenshots/diff_dark.png)|

cmd/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func runGenerateActionsRunnerToken(c *cli.Context) error {
4242
ctx, cancel := installSignals()
4343
defer cancel()
4444

45-
setting.Init(&setting.Options{})
45+
setting.MustInstalled()
4646

4747
scope := c.String("scope")
4848

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func confirm() (bool, error) {
5858
}
5959

6060
func initDB(ctx context.Context) error {
61-
setting.Init(&setting.Options{})
61+
setting.MustInstalled()
6262
setting.LoadDBSetting()
6363
setting.InitSQLLoggersForCli(log.INFO)
6464

cmd/doctor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func runRecreateTable(ctx *cli.Context) error {
9191
golog.SetOutput(log.LoggerToWriter(log.GetLogger(log.DEFAULT).Info))
9292

9393
debug := ctx.Bool("debug")
94-
setting.Init(&setting.Options{})
94+
setting.MustInstalled()
9595
setting.LoadDBSetting()
9696

9797
if debug {

cmd/dump.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func runDump(ctx *cli.Context) error {
182182
}
183183
fileName += "." + outType
184184
}
185-
setting.Init(&setting.Options{})
185+
setting.MustInstalled()
186186

187187
// make sure we are logging to the console no matter what the configuration tells us do to
188188
// FIXME: don't use CfgProvider directly

cmd/embedded.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ type assetFile struct {
9999
func initEmbeddedExtractor(c *cli.Context) error {
100100
setupConsoleLogger(log.ERROR, log.CanColorStderr, os.Stderr)
101101

102-
// Read configuration file
103-
setting.Init(&setting.Options{
104-
AllowEmpty: true,
105-
})
106-
107102
patterns, err := compileCollectPatterns(c.Args())
108103
if err != nil {
109104
return err

cmd/mailer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func runSendMail(c *cli.Context) error {
1616
ctx, cancel := installSignals()
1717
defer cancel()
1818

19-
setting.Init(&setting.Options{})
19+
setting.MustInstalled()
2020

2121
if err := argsSet(c, "title"); err != nil {
2222
return err

cmd/restore_repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func runRestoreRepository(c *cli.Context) error {
5151
ctx, cancel := installSignals()
5252
defer cancel()
5353

54-
setting.Init(&setting.Options{})
54+
setting.MustInstalled()
5555
var units []string
5656
if s := c.String("units"); s != "" {
5757
units = strings.Split(s, ",")

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func setup(ctx context.Context, debug bool) {
6161
} else {
6262
setupConsoleLogger(log.FATAL, false, os.Stderr)
6363
}
64-
setting.Init(&setting.Options{})
64+
setting.MustInstalled()
6565
if debug {
6666
setting.RunMode = "dev"
6767
}

0 commit comments

Comments
 (0)