更新 v1.12

This commit is contained in:
dengsgo 2019-12-17 16:38:14 +08:00
parent 46df7a206a
commit 4d5e13daf5
5 changed files with 28 additions and 13 deletions

View File

@ -1,3 +1,17 @@
### Release v1.12
2019.12.18
- 增加 自定义监控事件write/rename/remove/create/chmod
- 增加 {{event}} 事件名占位符 / event 网络通知字段
- 增加 文件(夹)变更动态添加/删除监听beta
- 优化 init 命令,如果已有`filegirl.yaml`现在提示错误,不会自动覆盖
- 优化 日志输出缓冲,可以通过 >> 将fileboy自身输出日志重定向到文件
- 修复 始终默认监听主目录的问题
- 升级 底层依赖
- PR Makefile 的支持 @jason-gao
### Release v1.10
2019.06.04

View File

@ -31,8 +31,8 @@ go version 1.13
### 下载二进制文件
Github: [download v1.10](https://github.com/dengsgo/fileboy/releases)
Gitee: [dowmload v1.10](https://gitee.com/dengsgo/fileboy/releases)
Github: [download v1.12](https://github.com/dengsgo/fileboy/releases)
Gitee: [dowmload v1.12](https://gitee.com/dengsgo/fileboy/releases)
下载已经编译好的对应平台二进制文件,重命名为`fileboy`, 加入系统 Path 中即可。
@ -137,7 +137,7 @@ notifier:
# 请求超时 15 秒
# POST 格式:
# Content-Type: application/json;charset=UTF-8
# User-Agent: FileBoy Net Notifier v1.10
# User-Agent: FileBoy Net Notifier v1.12
# Body: {"project_folder":"/project/path","file":"main.go","changed":1576567861913824940,"ext":".go","event":"write"}
# 例: http://example.com/notifier/fileboy-listener
# 不启用通知,请留空 ""

View File

@ -32,8 +32,8 @@ go version 1.13
### BINARIES
Github: [download v1.10](https://github.com/dengsgo/fileboy/releases)
Gitee: [dowmload v1.10](https://gitee.com/dengsgo/fileboy/releases)
Github: [download v1.12](https://github.com/dengsgo/fileboy/releases)
Gitee: [dowmload v1.12](https://gitee.com/dengsgo/fileboy/releases)
Download the compiled binary file of the corresponding platform, rename it `fileboy`, and add it to the system Path.
@ -133,7 +133,7 @@ notifier:
# timeout 15 second
# POST :
# Content-Type: application/json;charset=UTF-8
# User-Agent: FileBoy Net Notifier v1.10
# User-Agent: FileBoy Net Notifier v1.12
# Body: {"project_folder":"/project/path","file":"main.go","changed":1576567861913824940,"ext":".go","event":"write"}
# e.g: http://example.com/notifier/fileboy-listener
# no notice is enabled. Please leave it blank. ""

View File

@ -62,7 +62,7 @@ func (n *NetNotifier) dispatch(params *postParams) {
return
}
req.Header.Set("Content-Type", "application/json;charset=UTF-8")
req.Header.Set("User-Agent", "FileBoy Net Notifier v1.10")
req.Header.Set("User-Agent", "FileBoy Net Notifier v1.12")
resp, err := client.Do(req)
if err != nil {
log.Println(PreError, "notifier call failed. err:", err)

13
raw.go
View File

@ -55,6 +55,7 @@ command:
# 支持变量占位符,运行命令时会替换成实际值
# {{file}} 文件名( a.txt test/test2/a.go)
# {{ext}} 文件后缀( .go)
# {{event}} 事件(上面的events, write)
# {{changed}} 文件更新的本地时间戳(纳秒, 1537326690523046400)
# 变量占位符使用示例cp {{file}} /root/sync -rf myCommand --{{ext}} {{changed}}
exec:
@ -62,7 +63,7 @@ command:
- go env
# 文件变更后命令在xx毫秒后才会执行单位为毫秒
# 一个变更事件(A)如果在定义的延迟时间(t)又有新的文件变更事件(B)那么A会取消执行
# 一个变更事件(A)如果在定义的延迟时间(t), 又有新的文件变更事件(B), 那么A会取消执行
# B及以后的事件均依次类推直到事件Z在t内没有新事件产生Z 会执行
# 合理设置延迟时间将有效减少冗余和重复任务的执行
# 如果不需要该特性设置为 0
@ -75,8 +76,8 @@ notifier:
# 请求超时 15
# POST 格式:
# Content-Type: application/json;charset=UTF-8
# User-Agent: FileBoy Net Notifier v1.10
# Body: {"project_folder":"/watcher-dirs","file":"test.go","changed":1546421173070433800,"ext":".go"}
# User-Agent: FileBoy Net Notifier v1.12
# Body: {"project_folder":"/project/path","file":"main.go","changed":1576567861913824940,"ext":".go","event":"write"}
# : http://example.com/notifier/fileboy-listener
# 不启用通知请留空 ""
callUrl: ""
@ -118,13 +119,13 @@ var logo = `
_____ _ | | _____ ____) ) | | | |___| |
| ___) | | | | | ___) | __ (| | | |\_____/
| | _| |_| |_____| |_____| |__) ) |___| | ___
|_| (_____)_______)_______)______/ \_____/ (___) V1.10
|_| (_____)_______)_______)______/ \_____/ (___) V1.12
`
var statement = `Dengsgo [dengsgo@gmail.com] Open Source with MIT License`
var versionDesc = `
Version fileboy: v1.10 filegirl: v` + strconv.Itoa(Version) + `
Released 2019.6.4
Version fileboy: v1.12 filegirl: v` + strconv.Itoa(Version) + `
Released 2019.12.18
Licence MIT
Author dengsgo [dengsgo@gmail.com]
Website https://github.com/dengsgo/fileboy