chore: add make linstall

Chang committed Mar 8, 2026 at 11:17 UTC b09597264c00ddec4ed8e847fd75e70e25077150
2 files changed +12 -4
.github/workflows/ci.yml
+1 -3
@@ -32,9 +32,7 @@ jobs:
32 run: go mod download
33
34 - name: Install CI tools
35 - run: |
36 - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.1
37 - go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
35 + run: make install
36
37 - name: Run checks
38 run: |
Makefile
+11 -1
@@ -1,11 +1,16 @@
1 -.PHONY: help fmt vet lint lint-auto test vuln tidy all run build build-frontend build-tunnel build-server clean
1 +.PHONY: help install fmt vet lint lint-auto test vuln tidy all run build build-frontend build-tunnel build-server clean
2
3 .DEFAULT_GOAL := help
4
5 GO_PACKAGES := ./cmd/... ./portal/... ./sdk/... ./types/...
6 +GO_TOOLCHAIN_VERSION := $(shell awk '/^go / { print "go" $$2; exit }' go.mod)
7 +GOIMPORTS_VERSION := v0.41.0
8 +GOLANGCI_LINT_VERSION := v2.11.1
9 +GOVULNCHECK_VERSION := v1.1.4
10
11 help:
12 @echo "Available targets:"
13 + @echo " make install - Install Go developer tools used by this repo"
14 @echo " make fmt - Apply gofmt/goimports"
15 @echo " make lint-auto - Run autofix lint/format pipeline"
16 @echo " make build - Build everything (frontend, tunnel, server)"
@@ -15,6 +20,11 @@ help:
20 @echo " make run - Run relay server"
21 @echo " make clean - Remove build artifacts"
22
23 +install:
24 + GOTOOLCHAIN=$(GO_TOOLCHAIN_VERSION) go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)
25 + GOTOOLCHAIN=$(GO_TOOLCHAIN_VERSION) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
26 + GOTOOLCHAIN=$(GO_TOOLCHAIN_VERSION) go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION)
27 +
28 fmt:
29 gofmt -w .
30 goimports -w .