Bra

2020-11-15  本文已影响0人  Nick_4438

简介

看这个title宅男们可能要想歪了,其实不然,在查看grafana源码的时候发现该开源软件使用了一个工具bra。本文就分析一下grafana下如何使用bra工具

工作流程

详细脚本分解

run: scripts/go/bin/bra ## Build and run web server on filesystem changes.
    @GO111MODULE=on scripts/go/bin/bra run
[run]   # Commands run in start
init_cmds = [  
  ["go", "run", "build.go", "-dev", "build-cli"],
  ["go", "run", "build.go", "-dev", "build-server"],
  ["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]
watch_all = true   #  是否监听所有子目录
follow_symlinks = true
watch_dirs = [     # 需要监听的目录
  "$WORKDIR/pkg",
  "$WORKDIR/public/views",
  "$WORKDIR/conf",
]
watch_exts = [".go", ".ini", ".toml", ".template.html"]  ## 需要监听的扩展文件
build_delay = 1500
cmds = [                                                  # 执行的运行命令
  ["go", "run", "build.go", "-dev", "build-server"],
  ["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]
上一篇 下一篇

猜你喜欢

热点阅读