Comments (1)
filegirl.yaml
建议配置如下:
# 主配置
core:
# 配置版本号
version: 1
# 监控配置
monitor:
# 要监听的目录
# test1 监听当前目录下 test1 目录
# test1/test2 监听当前目录下 test1/test2 目录
# test1,* 监听当前目录下 test1 目录及其所有子目录(递归)
# .,* 监听当前目录及其所有子目录(递归)
includeDirs:
- .,*
# 不监听的目录
# .idea 忽略.idea目录及其所有子目录的监听
exceptDirs:
- .idea
- .git
- .vscode
- node_modules
- vendor
# 监听文件的格式,此类文件更改会执行 command 中的命令
# .go 后缀为 .go 的文件更改,会执行 command 中的命令
# .* 所有的文件更改都会执行 command 中的命令
types:
- .go
# 命令
command:
# 监听的文件有更改会执行的命令
# 可以有多条命令,会依次执行
# 如有多条命令,每条命令都会等待上一条命令执行完毕后才会执行
# 如遇交互式命令,允许外部获取输入
# 支持变量占位符,运行命令时会替换成实际值:
# {{file}} 文件名(如 a.txt 、test/test2/a.go)
# {{ext}} 文件后缀(如 .go)
# {{changed}} 文件更新的本地时间戳(纳秒,如 1537326690523046400)
# 变量占位符使用示例:cp {{file}} /root/sync -rf 、 myCommand --{{ext}} {{changed}}
exec:
- go build
- ./server-name
# 文件变更后命令在xx毫秒后才会执行,单位为毫秒
# 一个变更事件(A)如果在定义的延迟时间(t)内,又有新的文件变更事件(B),那么A会取消执行。
# B及以后的事件均依次类推,直到事件Z在t内没有新事件产生,Z 会执行
# 合理设置延迟时间,将有效减少冗余和重复任务的执行
# 如果不需要该特性,设置为 0
delayMillSecond: 2000
# 通知器
notifier:
# 文件更改会向该 url 发送请求(POST 一段 json 文本数据)
# 触发请求的时机和执行 command 命令是一致的
# 请求超时 15 秒
# POST 格式:
# Content-Type: application/json;charset=UTF-8
# User-Agent: FileBoy Net Notifier v1.9
# Body: {"project_folder":"/watcher-dirs","file":"test.go","changed":1546421173070433800,"ext":".go"}
# 例: http://example.com/notifier/fileboy-listener
# 不启用通知,请留空 ""
callUrl: ""
把 command -> exec
中的 server-name
改成实际 build 的二进制名字即可。
from fileboy.
Related Issues (20)
- 能否支持以守护进程运行? HOT 2
- go get 出现错误 HOT 1
- 权限问题 HOT 2
- Centos 7 no sapce left on device HOT 2
- 变量占位符 {{file}} bug HOT 3
- [建议意见]通知器在命令执行完成后会发送 http 请求 ? HOT 3
- [建议]增加指定配置文件启动 HOT 9
- 文件夹问题 HOT 6
- How can I correctly configure the python command in the filegirl.yaml file HOT 2
- 不能監控 /etc ?
- 监听完一次事件并执行命令后不再监听
- 需要支持程序【根】和【绝对】路径的支持 HOT 1
- In Docker container. fsnotify package error: "fsnotify: queue or buffer overflow. " HOT 2
- 估计是我的配置太奇葩了,,,,囧,试用失败 HOT 3
- 支持优雅的重启吗? HOT 3
- undefined: strings.ReplaceAll HOT 1
- 如果我启动一个简单的服务器,每次修改代码,fileboy好像不会自动停止掉服务器 HOT 4
- 执行的命令会被强制中断 HOT 3
- command not found: fileboy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fileboy.