diff --git a/.bra.toml b/.bra.toml new file mode 100644 index 0000000..1fac0e8 --- /dev/null +++ b/.bra.toml @@ -0,0 +1,21 @@ +[run] +init_cmds = [ + ["make", "build-backend"], + ["pkill", "zabbix-plugin"] +] # Commands run in start +watch_all = true # Watch all sub-directories +watch_dirs = ["pkg"] # Directories to watch +watch_exts = [".go"] # Extensions to watch +ignore = [".git", "node_modules"] # Directories to exclude from watching +ignore_files = [] # Regexps for ignoring specific notifies +build_delay = 1500 # Minimal interval to Trigger build event +interrupt_timout = 15 # Time to wait until force kill +graceful_kill = false # Wait for exit and before directly kill +cmds = [ + ["make", "build-backend"], + ["pkill", "zabbix-plugin"] +] # Commands to run + +[sync] +listen_addr = ":5050" +remote_addr = ":5050" diff --git a/Makefile b/Makefile index f6ceeed..afd9f1e 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,11 @@ build-backend: build-debug: env GOOS=linux go build -mod=vendor -gcflags=all="-N -l" -o ./dist/zabbix-plugin_linux_amd64 ./pkg +run-backend: + # Rebuilds plugin on changes and kill running instance which forces grafana to restart plugin + # See .bra.toml for bra configuration details + bra run + dist: dist-frontend dist-backend dist-frontend: yarn build