Skip to content

Commit

Permalink
Move go-licenses to generate
Browse files Browse the repository at this point in the history
The go-licenses check introduced in go-gitea#21034 is being run on make vendor
and occassionally causes an empty go-licenses file if the vendors need to
change. This should be moved to the generate task as it is a generated file.

Ref go-gitea#21034

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed Sep 4, 2022
1 parent 8b0aaa5 commit 2c8a1a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ clean:
fmt:
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)

.PHONY: vet
Expand Down Expand Up @@ -398,7 +398,6 @@ unit-test-coverage:
tidy:
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
@$(MAKE) --no-print-directory assets/go-licenses.json

.PHONY: vendor
vendor: tidy
Expand Down Expand Up @@ -709,6 +708,7 @@ backend: go-check generate $(EXECUTABLE)

.PHONY: generate
generate: $(TAGS_PREREQ)
@$(MAKE) --no-print-directory assets/go-licenses.json
@echo "Running go generate..."
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)

Expand Down

0 comments on commit 2c8a1a2

Please sign in to comment.