From ff448240c1af4553df88511fb84a07d3dfcbb40f Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Wed, 8 Oct 2025 15:04:36 +0200 Subject: [PATCH] Makefile: Change build-go to only build the binaries, and deprecate build-go-fast (#111986) --- .bra.toml | 2 +- Makefile | 8 ++++---- scripts/grafana-server/start-server | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.bra.toml b/.bra.toml index 6572f9a6afb..5af8e05ebcc 100644 --- a/.bra.toml +++ b/.bra.toml @@ -17,7 +17,7 @@ watch_exts = [".go", ".ini", ".toml", ".template.html"] ignore_files = [".*_gen.go"] build_delay = 1500 cmds = [ - ["make", "GO_BUILD_DEV=1", "build-go-fast"], + ["make", "GO_BUILD_DEV=1", "build-go"], ["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"] ] diff --git a/Makefile b/Makefile index 5a8b35f73b5..da5a7dfb749 100644 --- a/Makefile +++ b/Makefile @@ -233,13 +233,13 @@ update-workspace: gen-go bash scripts/go-workspace/update-workspace.sh .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" $(GO) run build.go $(GO_BUILD_FLAGS) build -build-go-fast: gen-go ## Build all Go binaries. - @echo "build go files" - $(GO) run build.go $(GO_BUILD_FLAGS) build +.PHONY: build-go-fast +build-go-fast: ## Build all Go binaries without updating workspace. + @echo "!!! [DEPRECATED] use build-go, they do the same thing now. This command will be removed soon" .PHONY: build-backend build-backend: ## Build Grafana backend. diff --git a/scripts/grafana-server/start-server b/scripts/grafana-server/start-server index d9581910b83..7b790a9bb9c 100755 --- a/scripts/grafana-server/start-server +++ b/scripts/grafana-server/start-server @@ -26,7 +26,7 @@ echo starting server # 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 [[ ! -f ./bin/"$ARCH"grafana ]]; then - make GO_BUILD_DEV=1 build-go-fast + make GO_BUILD_DEV=1 build-go fi cp -r ./bin $RUNDIR