summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Kriese <michael.kriese@visualon.de>2024-12-03 22:30:55 +0100
committerMichael Kriese <michael.kriese@visualon.de>2024-12-04 09:37:17 +0100
commitdf765431e49686cf863ce524a339776163ef0acf (patch)
tree1237e600263fc60f1712a93f1f622e44cc0b8956 /Makefile
parentbuild: use go from goroot for fmt (diff)
downloadforgejo-df765431e49686cf863ce524a339776163ef0acf.tar.xz
forgejo-df765431e49686cf863ce524a339776163ef0acf.zip
build: fix go command
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files 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)