Makefile: Change build-go to only build the binaries, and deprecate build-go-fast (#111986)

This commit is contained in:
Matheus Macabu
2025-10-08 15:04:36 +02:00
committed by GitHub
parent fcdfc86561
commit ff448240c1
3 changed files with 6 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ watch_exts = [".go", ".ini", ".toml", ".template.html"]
ignore_files = [".*_gen.go"] ignore_files = [".*_gen.go"]
build_delay = 1500 build_delay = 1500
cmds = [ cmds = [
["make", "GO_BUILD_DEV=1", "build-go-fast"], ["make", "GO_BUILD_DEV=1", "build-go"],
["make", "gen-jsonnet"], ["make", "gen-jsonnet"],
["./bin/grafana", "server", "-profile", "-profile-addr=127.0.0.1", "-profile-port=6000", "-profile-block-rate=1", "-profile-mutex-rate=5", "-packaging=dev", "cfg:app_mode=development"] ["./bin/grafana", "server", "-profile", "-profile-addr=127.0.0.1", "-profile-port=6000", "-profile-block-rate=1", "-profile-mutex-rate=5", "-packaging=dev", "cfg:app_mode=development"]
] ]

View File

@@ -233,13 +233,13 @@ update-workspace: gen-go
bash scripts/go-workspace/update-workspace.sh bash scripts/go-workspace/update-workspace.sh
.PHONY: build-go .PHONY: build-go
build-go: gen-go update-workspace ## Build all Go binaries. build-go: ## Build all Go binaries.
@echo "build go files with updated workspace" @echo "build go files with updated workspace"
$(GO) run build.go $(GO_BUILD_FLAGS) build $(GO) run build.go $(GO_BUILD_FLAGS) build
build-go-fast: gen-go ## Build all Go binaries. .PHONY: build-go-fast
@echo "build go files" build-go-fast: ## Build all Go binaries without updating workspace.
$(GO) run build.go $(GO_BUILD_FLAGS) build @echo "!!! [DEPRECATED] use build-go, they do the same thing now. This command will be removed soon"
.PHONY: build-backend .PHONY: build-backend
build-backend: ## Build Grafana backend. build-backend: ## Build Grafana backend.

View File

@@ -26,7 +26,7 @@ echo starting server
# see https://github.com/air-verse/air/issues/525 # see https://github.com/air-verse/air/issues/525
# if this gets resolved, we could remove the go build and rely on the binary being present as before # if this gets resolved, we could remove the go build and rely on the binary being present as before
if [[ ! -f ./bin/"$ARCH"grafana ]]; then if [[ ! -f ./bin/"$ARCH"grafana ]]; then
make GO_BUILD_DEV=1 build-go-fast make GO_BUILD_DEV=1 build-go
fi fi
cp -r ./bin $RUNDIR cp -r ./bin $RUNDIR