Skip to content

Commit 8aaec8e

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Fix issue comment number (go-gitea#30556) Fix duplicate co-author in squashed merge commit messages (go-gitea#33020) Merge updatecommentattachment functions (go-gitea#33044) Move SetMerged to service layer (go-gitea#33045) Remove aws go sdk package dependency (go-gitea#33029) Fix settings not being loaded at CLI (go-gitea#26402) Refactor fixture loading for testing (go-gitea#33024) Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (go-gitea#32987) Fix bug automerge cannot be chosed when there is only 1 merge style (go-gitea#33040) use `-s -w` ldflags for release artifacts (go-gitea#33041)
2 parents dcb2993 + a54cc05 commit 8aaec8e

37 files changed

+638
-441
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -806,22 +806,22 @@ $(DIST_DIRS):
806806

807807
.PHONY: release-windows
808808
release-windows: | $(DIST_DIRS)
809-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
809+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
810810
ifeq (,$(findstring gogit,$(TAGS)))
811-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
811+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
812812
endif
813813

814814
.PHONY: release-linux
815815
release-linux: | $(DIST_DIRS)
816-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
816+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
817817

818818
.PHONY: release-darwin
819819
release-darwin: | $(DIST_DIRS)
820-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
820+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
821821

822822
.PHONY: release-freebsd
823823
release-freebsd: | $(DIST_DIRS)
824-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
824+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
825825

826826
.PHONY: release-copy
827827
release-copy: | $(DIST_DIRS)

assets/go-licenses.json

-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/admin_user_create.go

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ var microcmdUserCreate = &cli.Command{
6969
}
7070

7171
func runCreateUser(c *cli.Context) error {
72+
// this command highly depends on the many setting options (create org, visibility, etc.), so it must have a full setting load first
73+
// duplicate setting loading should be safe at the moment, but it should be refactored & improved in the future.
74+
setting.LoadSettings()
75+
7276
if err := argsSet(c, "email"); err != nil {
7377
return err
7478
}

cmd/web.go

+11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"path/filepath"
1313
"strconv"
1414
"strings"
15+
"time"
1516

1617
_ "net/http/pprof" // Used for debugging if enabled and a web server is running
1718

@@ -115,6 +116,16 @@ func showWebStartupMessage(msg string) {
115116
log.Info("* CustomPath: %s", setting.CustomPath)
116117
log.Info("* ConfigFile: %s", setting.CustomConf)
117118
log.Info("%s", msg) // show startup message
119+
120+
if setting.CORSConfig.Enabled {
121+
log.Info("CORS Service Enabled")
122+
}
123+
if setting.DefaultUILocation != time.Local {
124+
log.Info("Default UI Location is %v", setting.DefaultUILocation.String())
125+
}
126+
if setting.MailService != nil {
127+
log.Info("Mail Service Enabled: RegisterEmailConfirm=%v, Service.EnableNotifyMail=%v", setting.Service.RegisterEmailConfirm, setting.Service.EnableNotifyMail)
128+
}
118129
}
119130

120131
func serveInstall(ctx *cli.Context) error {

go.mod

-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ require (
2828
github.com/PuerkitoBio/goquery v1.10.0
2929
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.3
3030
github.com/alecthomas/chroma/v2 v2.14.0
31-
github.com/aws/aws-sdk-go v1.55.5
3231
github.com/aws/aws-sdk-go-v2/credentials v1.17.42
3332
github.com/aws/aws-sdk-go-v2/service/codecommit v1.27.3
3433
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
@@ -61,7 +60,6 @@ require (
6160
github.com/go-redsync/redsync/v4 v4.13.0
6261
github.com/go-sql-driver/mysql v1.8.1
6362
github.com/go-swagger/go-swagger v0.31.0
64-
github.com/go-testfixtures/testfixtures/v3 v3.11.0
6563
github.com/go-webauthn/webauthn v0.11.2
6664
github.com/gobwas/glob v0.2.3
6765
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
@@ -145,8 +143,6 @@ require (
145143
filippo.io/edwards25519 v1.1.0 // indirect
146144
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 // indirect
147145
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
148-
github.com/ClickHouse/ch-go v0.63.1 // indirect
149-
github.com/ClickHouse/clickhouse-go/v2 v2.24.0 // indirect
150146
github.com/DataDog/zstd v1.5.6 // indirect
151147
github.com/Masterminds/goutils v1.1.1 // indirect
152148
github.com/Masterminds/semver/v3 v3.3.0 // indirect
@@ -204,8 +200,6 @@ require (
204200
github.com/go-ap/errors v0.0.0-20240910140019-1e9d33cc1568 // indirect
205201
github.com/go-asn1-ber/asn1-ber v1.5.7 // indirect
206202
github.com/go-enry/go-oniguruma v1.2.1 // indirect
207-
github.com/go-faster/city v1.0.1 // indirect
208-
github.com/go-faster/errors v0.7.1 // indirect
209203
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e // indirect
210204
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
211205
github.com/go-ini/ini v1.67.0 // indirect
@@ -270,7 +264,6 @@ require (
270264
github.com/oklog/ulid v1.3.1 // indirect
271265
github.com/olekukonko/tablewriter v0.0.5 // indirect
272266
github.com/onsi/ginkgo v1.16.5 // indirect
273-
github.com/paulmach/orb v0.11.1 // indirect
274267
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
275268
github.com/pierrec/lz4/v4 v4.1.21 // indirect
276269
github.com/pjbgf/sha1cd v0.3.0 // indirect
@@ -285,7 +278,6 @@ require (
285278
github.com/russross/blackfriday/v2 v2.1.0 // indirect
286279
github.com/sagikazarmark/locafero v0.6.0 // indirect
287280
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
288-
github.com/segmentio/asm v1.2.0 // indirect
289281
github.com/shopspring/decimal v1.4.0 // indirect
290282
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
291283
github.com/sirupsen/logrus v1.9.3 // indirect
@@ -310,8 +302,6 @@ require (
310302
github.com/zeebo/blake3 v0.2.4 // indirect
311303
go.etcd.io/bbolt v1.3.11 // indirect
312304
go.mongodb.org/mongo-driver v1.17.1 // indirect
313-
go.opentelemetry.io/otel v1.31.0 // indirect
314-
go.opentelemetry.io/otel/trace v1.31.0 // indirect
315305
go.uber.org/atomic v1.11.0 // indirect
316306
go.uber.org/multierr v1.11.0 // indirect
317307
go.uber.org/zap v1.27.0 // indirect

0 commit comments

Comments
 (0)