From df765431e49686cf863ce524a339776163ef0acf Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Tue, 3 Dec 2024 22:30:55 +0100 Subject: [PATCH] build: fix go command --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b0277b95d5..1f350dc256 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ DIST := dist DIST_DIRS := $(DIST)/binaries $(DIST)/release IMPORT := code.gitea.io/gitea -GO ?= go +GO ?= $(shell go env GOROOT)/bin/go SHASUM ?= shasum -a 256 HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes) COMMA := , @@ -337,7 +337,7 @@ clean: .PHONY: fmt fmt: - @GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(shell $(GO) env GOROOT) run build/code-batch-process.go gitea-fmt -w '{file-list}' + @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 '{{' or '(' and before '}}' or ')' unless there is only @# whitespace before it @@ -620,7 +620,7 @@ tidy-check: tidy go-licenses: $(GO_LICENSE_FILE) $(GO_LICENSE_FILE): go.mod go.sum - -$(shell $(GO) env GOROOT)/bin/go run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null + -$(GO) run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null $(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE) @rm -rf $(GO_LICENSE_TMP_DIR)