mirror of https://github.com/IoTcat/cron-git.git
parent
91f66349ef
commit
f65a499d63
3 changed files with 41 additions and 2 deletions
@ -1,2 +1,41 @@ |
||||
# cron-git |
||||
crontab git task by nodejs |
||||
|
||||
## usage |
||||
```js |
||||
var o = { |
||||
dir: __dirname, |
||||
debug: false, |
||||
allowNotice: true, |
||||
pull: (params, callback) => pull(params, callback), |
||||
push: (params, callback) => push(params, callback), |
||||
sync: (callback, params_pull, params_push) => sync(callback, params_pull, params_push), |
||||
schedule: (time, callback, params_pull, params_push) => schedule(time, callback, params_pull, params_push) |
||||
} |
||||
``` |
||||
|
||||
## params_pull |
||||
```js |
||||
var params = { |
||||
remote: { |
||||
repo: 'origin', |
||||
branch: 'master' |
||||
}, |
||||
pull_params: {} |
||||
} |
||||
``` |
||||
|
||||
## params_push |
||||
```js |
||||
var params = { |
||||
add: { |
||||
path: './*' |
||||
}, |
||||
commit: { |
||||
message: "Committed by cron-git from "+ require('os').hostname() |
||||
}, |
||||
push_params: ['-u', 'origin', 'master'] |
||||
} |
||||
```` |
||||
## License |
||||
Apache-2.0 |
Loading…
Reference in new issue