Fix for go tools called from make #568

Merged
6543 merged 9 commits from :toolsfix into main 2023-08-21 22:01:17 +00:00
3 changed files with 6 additions and 4 deletions
Showing only changes of commit bfaf32edd1 - Show all commits

@ -8,7 +8,7 @@ labels:
### describe your environment
- tea version used (`tea -v`):
- [ ] I also reproduced the issue [with the latest master build](https://dl.gitea.io/tea/master)
- [ ] I also reproduced the issue [with the latest master build](https://dl.gitea.com/tea/main/)
- Gitea version used:
- [ ] the issue only occurred after updating gitea recently
- operating system:

2
.gitignore vendored

@ -1,5 +1,5 @@
tea
/gitea-vet
/gitea-vet[.exe]
.idea/
.history/

@ -36,8 +36,10 @@ SOURCES ?= $(shell find . -name "*.go" -type f)
# OS specific vars.
ifeq ($(OS), Windows_NT)
EXECUTABLE := tea.exe
VET_TOOL := gitea-vet.exe
else
EXECUTABLE := tea
VET_TOOL := gitea-vet
ifneq ($(shell uname -s), OpenBSD)
override BUILDMODE := -buildmode=pie
endif
@ -61,7 +63,7 @@ vet:
$(GO) vet $(PACKAGES)
# Custom vet
$(GO) build code.gitea.io/gitea-vet
$(GO) vet -vettool=gitea-vet $(PACKAGES)
$(GO) vet -vettool=$(VET_TOOL) $(PACKAGES)
.PHONY: lint
lint: install-lint-tools
@ -120,7 +122,7 @@ release: release-dirs install-release-tools release-os release-compress release-
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release
mkdir -p $(DIST)/release
.PHONY: release-os
release-os: