Skip to content

Commit 9767573

Browse files
authored
Merge branch 'main' into feature/webhook-payload-optimization
2 parents b718c54 + c4c1a4b commit 9767573

25 files changed

+566
-94
lines changed

MAINTAINERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ a1012112796 <[email protected]> (@a1012112796)
3636
Karl Heinz Marbaise <[email protected]> (@khmarbaise)
3737
Norwin Roosen <[email protected]> (@noerw)
3838
Kyle Dumont <[email protected]> (@kdumontnu)
39-
Patrick Schratz <[email protected]> (@pat-s)
4039
Janis Estelmann <[email protected]> (@KN4CK3R)
41-
Steven Kriegler <[email protected]> (@justusbunsi)
4240
Jimmy Praet <[email protected]> (@jpraet)
4341
Leon Hofmeister <[email protected]> (@delvh)
4442
Wim <[email protected]> (@42wim)

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ ifeq ($(HAS_GO), yes)
4848
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
4949
endif
5050

51+
CGO_ENABLED ?= 0
52+
ifneq (,$(findstring sqlite,$(TAGS))$(findstring pam,$(TAGS)))
53+
CGO_ENABLED = 1
54+
endif
55+
56+
STATIC ?=
57+
EXTLDFLAGS ?=
58+
ifneq ($(STATIC),)
59+
EXTLDFLAGS = -extldflags "-static"
60+
endif
61+
5162
ifeq ($(GOOS),windows)
5263
IS_WINDOWS := yes
5364
else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows)
@@ -746,7 +757,10 @@ security-check:
746757
go run $(GOVULNCHECK_PACKAGE) -show color ./...
747758

748759
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
749-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
760+
ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),)
761+
$(error pam support set via TAGS doesn't support static builds)
762+
endif
763+
CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
750764

751765
.PHONY: release
752766
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-check

flake.nix

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,45 @@
1111
pkgs = nixpkgs.legacyPackages.${system};
1212
in
1313
{
14-
devShells.default = pkgs.mkShell {
15-
buildInputs = with pkgs; [
16-
# generic
17-
git
18-
git-lfs
19-
gnumake
20-
gnused
21-
gnutar
22-
gzip
14+
devShells.default =
15+
with pkgs;
16+
let
17+
# only bump toolchain versions here
18+
go = go_1_24;
19+
nodejs = nodejs_24;
20+
python3 = python312;
21+
in
22+
pkgs.mkShell {
23+
buildInputs = [
24+
# generic
25+
git
26+
git-lfs
27+
gnumake
28+
gnused
29+
gnutar
30+
gzip
2331

24-
# frontend
25-
nodejs_22
32+
# frontend
33+
nodejs
2634

27-
# linting
28-
python312
29-
uv
35+
# linting
36+
python3
37+
uv
3038

31-
# backend
32-
go_1_24
33-
gofumpt
34-
sqlite
35-
];
36-
shellHook = ''
37-
export GO="${pkgs.go_1_24}/bin/go"
38-
export GOROOT="${pkgs.go_1_24}/share/go"
39-
'';
40-
};
39+
# backend
40+
go
41+
glibc.static
42+
gofumpt
43+
sqlite
44+
];
45+
CFLAGS = "-I${glibc.static.dev}/include";
46+
LDFLAGS = "-L ${glibc.static}/lib";
47+
GO = "${go}/bin/go";
48+
GOROOT = "${go}/share/go";
49+
50+
TAGS = "sqlite sqlite_unlock_notify";
51+
STATIC = "true";
52+
};
4153
}
4254
);
4355
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module code.gitea.io/gitea
22

3-
go 1.24.5
3+
go 1.24.6
44

55
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
66
// But some CAs use negative serial number, just relax the check. related:

modules/structs/repo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ type Repository struct {
8484
Updated time.Time `json:"updated_at"`
8585
ArchivedAt time.Time `json:"archived_at"`
8686
Permissions *Permission `json:"permissions,omitempty"`
87+
HasCode bool `json:"has_code"`
8788
HasIssues bool `json:"has_issues"`
8889
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
8990
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
@@ -170,6 +171,8 @@ type EditRepoOption struct {
170171
Private *bool `json:"private,omitempty"`
171172
// either `true` to make this repository a template or `false` to make it a normal repository
172173
Template *bool `json:"template,omitempty"`
174+
// either `true` to enable code for this repository or `false` to disable it.
175+
HasCode *bool `json:"has_code,omitempty"`
173176
// either `true` to enable issues for this repository or `false` to disable them.
174177
HasIssues *bool `json:"has_issues,omitempty"`
175178
// set this structure to configure internal issue tracker

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ commit_graph.color = Color
13221322
commit.contained_in = This commit is contained in:
13231323
commit.contained_in_default_branch = This commit is part of the default branch
13241324
commit.load_referencing_branches_and_tags = Load branches and tags referencing this commit
1325+
commit.merged_in_pr = This commit was merged in pull request %s.
13251326
blame = Blame
13261327
download_file = Download file
13271328
normal_view = Normal View

options/locale/locale_fr-FR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ commit_graph.color=Couleur
13221322
commit.contained_in=Cette révision appartient à :
13231323
commit.contained_in_default_branch=Cette révision appartient à la branche par défaut
13241324
commit.load_referencing_branches_and_tags=Charger les branches et étiquettes référençant cette révision
1325+
commit.merged_in_pr=Cette révision a été fusionnée dans la demande d’ajout %s.
13251326
blame=Annotations
13261327
download_file=Télécharger le fichier
13271328
normal_view=Vue normale

0 commit comments

Comments
 (0)