项目作者: soulman-is-good

项目描述 :
Git webhook watcher and publisher
高级语言: JavaScript
项目地址: git://github.com/soulman-is-good/gitpub.git
创建时间: 2015-10-26T07:18:19Z
项目社区:https://github.com/soulman-is-good/gitpub

开源协议:

下载


Git web hook listener

Helps to manage git repositories listening for push events, with script executions

Install

One must clone this repository to be able to launch listener.

Once repo is cloned go to it’s dir and just run app.js

  1. git clone https://github.com/soulman-is-good/gitpub.git
  2. cd gitpub
  3. npm install
  4. npm start

Configure

One must have configuration json file ready to be able to run this listener (in other words, listener must have an instruction for what to do if event occures)

By default gitpub looks for GITPUB_CONFIG environment variable, containing full path to configuration json file including filename, and then tries to look for config.json file in repository folder.

You can take config.template.json file in repo dir for start.

Configuration looks like this:

  1. {
  2. "myrepo-name-as-is": {
  3. "branch-name-for-example-master": {
  4. "dir": "/home/user/myrepo-to-publish/",
  5. "beforePull": [],
  6. "afterPull": [
  7. ["npm install", "bower install"],
  8. ["gulp", "pm2 restart all"]
  9. ]
  10. }
  11. },
  12. "myotherrepo": {
  13. "master": {},
  14. "dev": {},
  15. "RC": {}
  16. }
  17. }