appventus/hooks

此包已被 放弃 且不再维护。未建议替代包。

AppVentus自定义git钩子

安装: 52

依赖者: 0

建议者: 0

安全性: 0

星标: 2

关注者: 11

分支: 0

开放问题: 0

语言:Shell

dev-master 2013-08-05 09:45 UTC

This package is not auto-updated.

Last update: 2023-07-31 09:24:36 UTC


README

此工具会插入一个git钩子,该钩子将为您的symfony2应用程序运行PHP语法检查和phpunit测试。

  1. 安装

在您的composer.json中添加以下行

"require-dev": {
    [...],
    "appventus/hooks": "dev-master"
},

"scripts": {
    "post-update-cmd": [
        [...],
        "chmod a+x vendor/appventus/hooks/deploy.sh && sh vendor/appventus/hooks/deploy.sh"
    ]
},
  1. 使用方法

当您提交更改时,将运行语法和phpunit。如果失败,则提交将被中止。您可以在不进行验证的情况下运行提交:git commit -n

享受!