mirror of
https://github.com/grafana/grafana.git
synced 2026-03-13 15:29:48 +08:00
Makefile: Change build-go to only build the binaries, and deprecate build-go-fast (#111986)
This commit is contained in:
@@ -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"]
|
||||||
]
|
]
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user