Build: Add experimental build+watch with Air (#106834)
* Build: Add experimental build+watch with Air * Codeowners: Add owner for .air.toml * Makefile: Add installation reference for Air
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
[build]
|
||||
bin = "./bin/grafana"
|
||||
args_bin = ["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"]
|
||||
cmd = "make GO_BUILD_DEV=1 build-backend"
|
||||
exclude_regex = ["_test.go", "_gen.go"]
|
||||
exclude_unchanged = true
|
||||
follow_symlink = true
|
||||
include_dir = ["apps", "conf", "devenv/dev-dashboards", "pkg", "public/views"]
|
||||
include_ext = ["go", "ini", "toml", "html", "json"]
|
||||
pre_cmd = ["make gen-go", "make gen-jsonnet"]
|
||||
rerun_delay = 1000
|
||||
stop_on_error = true
|
||||
|
||||
[log]
|
||||
time = true
|
||||
|
||||
[misc]
|
||||
clean_on_exit = false
|
||||
|
||||
[proxy]
|
||||
enabled = false
|
||||
|
||||
[screen]
|
||||
clear_on_rebuild = false
|
||||
keep_scroll = true
|
||||
@@ -68,6 +68,7 @@
|
||||
/scripts/go-workspace @grafana/grafana-app-platform-squad
|
||||
/scripts/ci/backend-tests @grafana/grafana-operator-experience-squad
|
||||
/hack/ @grafana/grafana-app-platform-squad
|
||||
/.air.toml @macabu
|
||||
|
||||
/pkg/apis/provisioning @grafana/grafana-git-ui-sync-team
|
||||
/public/app/features/provisioning @grafana/grafana-git-ui-sync-team
|
||||
|
||||
@@ -266,6 +266,10 @@ run-go: ## Build and run web server immediately.
|
||||
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
yarn start
|
||||
|
||||
.PHONY: run-air
|
||||
run-air: ## [Experimental] Build and run backend, and watch for changes. See .air.toml for configuration. Check https://github.com/air-verse/air for installation instructions.
|
||||
air -c .air.toml
|
||||
|
||||
##@ Testing
|
||||
|
||||
.PHONY: test-go
|
||||
|
||||
Reference in New Issue
Block a user