@@ -73,6 +73,7 @@ EXTRA_GOFLAGS ?=
7373MAKE_VERSION := $(shell "$(MAKE ) " -v | cat | head -n 1)
7474MAKE_EVIDENCE_DIR := .make_evidence
7575
76+ GOTESTFLAGS ?=
7677ifeq ($(RACE_ENABLED ) ,true)
7778 GOFLAGS += -race
7879 GOTESTFLAGS += -race
@@ -114,8 +115,6 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
114115GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO ) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO ) list ./... | grep -v /vendor/) )
115116MIGRATE_TEST_PACKAGES ?= $(shell $(GO ) list code.gitea.io/gitea/models/migrations/...)
116117
117- FOMANTIC_WORK_DIR := web_src/fomantic
118-
119118WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
120119WEBPACK_CONFIGS := webpack.config.js tailwind.config.js
121120WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
@@ -139,7 +138,7 @@ TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
139138
140139TEST_TAGS ?= $(TAGS_SPLIT ) sqlite sqlite_unlock_notify
141140
142- TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE ) $(FOMANTIC_WORK_DIR ) /node_modules $( DIST ) $(MAKE_EVIDENCE_DIR ) $(AIR_TMP_DIR ) $(GO_LICENSE_TMP_DIR )
141+ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE ) $(DIST ) $(MAKE_EVIDENCE_DIR ) $(AIR_TMP_DIR ) $(GO_LICENSE_TMP_DIR )
143142
144143GO_DIRS := build cmd models modules routers services tests
145144WEB_DIRS := web_src/js web_src/css
@@ -311,10 +310,10 @@ lint-frontend: lint-js lint-css ## lint frontend files
311310lint-frontend-fix : lint-js-fix lint-css-fix # # lint frontend files and fix issues
312311
313312.PHONY : lint-backend
314- lint-backend : lint-go lint-go-vet lint-go-gopls lint-editorconfig # # lint backend files
313+ lint-backend : lint-go lint-go-gitea- vet lint-go-gopls lint-editorconfig # # lint backend files
315314
316315.PHONY : lint-backend-fix
317- lint-backend-fix : lint-go-fix lint-go-vet lint-editorconfig # # lint backend files and fix issues
316+ lint-backend-fix : lint-go-fix lint-go-gitea- vet lint-editorconfig # # lint backend files and fix issues
318317
319318.PHONY : lint-js
320319lint-js : node_modules # # lint js files
@@ -365,9 +364,9 @@ lint-go-windows:
365364 @GOOS= GOARCH= $(GO ) install $(GOLANGCI_LINT_PACKAGE )
366365 golangci-lint run
367366
368- .PHONY : lint-go-vet
369- lint-go-vet : # # lint go files with vet
370- @echo " Running go vet..."
367+ .PHONY : lint-go-gitea- vet
368+ lint-go-gitea- vet : # # lint go files with gitea- vet
369+ @echo " Running gitea- vet..."
371370 @GOOS= GOARCH= $(GO ) build code.gitea.io/gitea-vet
372371 @$(GO ) vet -vettool=gitea-vet ./...
373372
@@ -470,7 +469,9 @@ tidy-check: tidy
470469go-licenses : $(GO_LICENSE_FILE ) # # regenerate go licenses
471470
472471$(GO_LICENSE_FILE ) : go.mod go.sum
473- -$(GO ) run $(GO_LICENSES_PACKAGE ) save . --force --save_path=$(GO_LICENSE_TMP_DIR ) 2> /dev/null
472+ @rm -rf $(GO_LICENSE_FILE )
473+ $(GO ) install $(GO_LICENSES_PACKAGE )
474+ -GOOS=linux CGO_ENABLED=1 go-licenses save . --force --save_path=$(GO_LICENSE_TMP_DIR ) 2> /dev/null
474475 $(GO ) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR ) $(GO_LICENSE_FILE )
475476 @rm -rf $(GO_LICENSE_TMP_DIR )
476477
@@ -844,19 +845,6 @@ update-py: node-check | node_modules ## update py dependencies
844845 poetry install
845846 @touch .venv
846847
847- .PHONY : fomantic
848- fomantic : # # build fomantic files
849- rm -rf $(FOMANTIC_WORK_DIR ) /build
850- cd $(FOMANTIC_WORK_DIR ) && npm install --no-save
851- cp -f $(FOMANTIC_WORK_DIR ) /theme.config.less $(FOMANTIC_WORK_DIR ) /node_modules/fomantic-ui/src/theme.config
852- cp -rf $(FOMANTIC_WORK_DIR ) /_site $(FOMANTIC_WORK_DIR ) /node_modules/fomantic-ui/src/
853- $(SED_INPLACE ) -e ' s/ overrideBrowserslist\r/ overrideBrowserslist: ["defaults"]\r/g' $(FOMANTIC_WORK_DIR ) /node_modules/fomantic-ui/tasks/config/tasks.js
854- cd $(FOMANTIC_WORK_DIR ) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
855- # fomantic uses "touchstart" as click event for some browsers, it's not ideal, so we force fomantic to always use "click" as click event
856- $(SED_INPLACE ) -e ' s/clickEvent[ \t]*=/clickEvent = "click", unstableClickEvent =/g' $(FOMANTIC_WORK_DIR ) /build/semantic.js
857- $(SED_INPLACE ) -e ' s/\r//g' $(FOMANTIC_WORK_DIR ) /build/semantic.css $(FOMANTIC_WORK_DIR ) /build/semantic.js
858- rm -f $(FOMANTIC_WORK_DIR ) /build/* .min.*
859-
860848.PHONY : webpack
861849webpack : $(WEBPACK_DEST ) # # build webpack files
862850
@@ -903,10 +891,6 @@ update-translations:
903891 mv ./translations/* .ini ./options/locale/
904892 rmdir ./translations
905893
906- .PHONY : generate-license
907- generate-license : # # update license files
908- $(GO ) run build/generate-licenses.go
909-
910894.PHONY : generate-gitignore
911895generate-gitignore : # # update gitignore files
912896 $(GO ) run build/generate-gitignores.go
0 commit comments