Skip to content

Commit 7aa16d2

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Move notifywatch to service layer (go-gitea#33825) [skip ci] Updated translations via Crowdin Only keep popular licenses (go-gitea#33832) Removing unwanted ui container (go-gitea#33833) Full-file syntax highlighting for diff pages (go-gitea#33766) Improve theme display (go-gitea#30671) Decouple context from repository related structs (go-gitea#33823) Improve log format (go-gitea#33814) Decouple diff stats query from actual diffing (go-gitea#33810) Add global lock for migrations to make upgrade more safe with multiple replications (go-gitea#33706) Do not show passkey on http sites (go-gitea#33820)
2 parents 00442d2 + ae63568 commit 7aa16d2

File tree

787 files changed

+1198
-41578
lines changed

Some content is hidden

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

787 files changed

+1198
-41578
lines changed

.github/workflows/cron-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
go-version-file: go.mod
1717
check-latest: true
18-
- run: make generate-license generate-gitignore
18+
- run: make generate-gitignore
1919
timeout-minutes: 40
2020
- name: push translations to repo
2121
uses: appleboy/[email protected]

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -906,10 +906,6 @@ update-translations:
906906
mv ./translations/*.ini ./options/locale/
907907
rmdir ./translations
908908

909-
.PHONY: generate-license
910-
generate-license: ## update license files
911-
$(GO) run build/generate-licenses.go
912-
913909
.PHONY: generate-gitignore
914910
generate-gitignore: ## update gitignore files
915911
$(GO) run build/generate-gitignores.go

build/generate-licenses.go

Lines changed: 0 additions & 176 deletions
This file was deleted.

build/license/aliasgenerator.go

Lines changed: 0 additions & 41 deletions
This file was deleted.

build/license/aliasgenerator_test.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

cmd/doctor.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package cmd
55

66
import (
7+
"context"
78
"fmt"
89
golog "log"
910
"os"
@@ -130,8 +131,8 @@ func runRecreateTable(ctx *cli.Context) error {
130131
}
131132
recreateTables := migrate_base.RecreateTables(beans...)
132133

133-
return db.InitEngineWithMigration(stdCtx, func(x *xorm.Engine) error {
134-
if err := migrations.EnsureUpToDate(x); err != nil {
134+
return db.InitEngineWithMigration(stdCtx, func(ctx context.Context, x *xorm.Engine) error {
135+
if err := migrations.EnsureUpToDate(ctx, x); err != nil {
135136
return err
136137
}
137138
return recreateTables(x)

cmd/migrate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"context"
88

99
"code.gitea.io/gitea/models/db"
10-
"code.gitea.io/gitea/models/migrations"
1110
"code.gitea.io/gitea/modules/log"
1211
"code.gitea.io/gitea/modules/setting"
12+
"code.gitea.io/gitea/services/versioned_migration"
1313

1414
"github.com/urfave/cli/v2"
1515
)
@@ -36,7 +36,7 @@ func runMigrate(ctx *cli.Context) error {
3636
log.Info("Log path: %s", setting.Log.RootPath)
3737
log.Info("Configuration file: %s", setting.CustomConf)
3838

39-
if err := db.InitEngineWithMigration(context.Background(), migrations.Migrate); err != nil {
39+
if err := db.InitEngineWithMigration(context.Background(), versioned_migration.Migrate); err != nil {
4040
log.Fatal("Failed to initialize ORM engine: %v", err)
4141
return err
4242
}

cmd/migrate_storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import (
1313
actions_model "code.gitea.io/gitea/models/actions"
1414
"code.gitea.io/gitea/models/db"
1515
git_model "code.gitea.io/gitea/models/git"
16-
"code.gitea.io/gitea/models/migrations"
1716
packages_model "code.gitea.io/gitea/models/packages"
1817
repo_model "code.gitea.io/gitea/models/repo"
1918
user_model "code.gitea.io/gitea/models/user"
2019
"code.gitea.io/gitea/modules/log"
2120
packages_module "code.gitea.io/gitea/modules/packages"
2221
"code.gitea.io/gitea/modules/setting"
2322
"code.gitea.io/gitea/modules/storage"
23+
"code.gitea.io/gitea/services/versioned_migration"
2424

2525
"github.com/urfave/cli/v2"
2626
)
@@ -227,7 +227,7 @@ func runMigrateStorage(ctx *cli.Context) error {
227227
log.Info("Log path: %s", setting.Log.RootPath)
228228
log.Info("Configuration file: %s", setting.CustomConf)
229229

230-
if err := db.InitEngineWithMigration(context.Background(), migrations.Migrate); err != nil {
230+
if err := db.InitEngineWithMigration(context.Background(), versioned_migration.Migrate); err != nil {
231231
log.Fatal("Failed to initialize ORM engine: %v", err)
232232
return err
233233
}

0 commit comments

Comments
 (0)