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
pull/106775/head^2
Matheus Macabu 1 week ago committed by GitHub
parent 9b4afdc5b9
commit f68c451b00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      .air.toml
  2. 1
      .github/CODEOWNERS
  3. 4
      Makefile

@ -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

Loading…
Cancel
Save